For the ketchup sauce: Combine the ketchup, fish sauce, star anise and 2 tablespoons water in a small saucepot and set over medium heat. Cook, stirring often, until it begins to bubble, then remove from the heat and let cool completely. Stir in the mayonnaise. Refrigerate until ready to use.
For the egg rolls: Set a cast-iron pan over medium-high heat for 3 minutes. Add 2 tablespoons oil, then the ground beef and a pinch of salt and pepper and cook for 4 to 5 minutes. Add half the onions and cook, stirring occasionally, until the onions are softened, about 4 minutes. Transfer the mixture to a sheet pan to cool, about 10 minutes. Mix in the sun-dried tomatoes and the remaining raw onions.
Lay the egg roll wrappers out on a clean work surface. Place a slice of American cheese in the center of a wrapper, then some of the beef mixture followed by the shredded cabbage. Roll up the egg roll, securing it closed with some of the beaten egg. Place on a sheet pan seam-side down while assembling the remaining egg rolls in the same manner.
Add the remaining 1 1/2 quarts oil to a Dutch oven or heavy-bottomed pot over medium-high heat and bring the temperature up to 350 degrees F.
Place the egg rolls in batches into the hot canola oil seam-side down, and fry until golden brown, about 4 minutes.
Cut the egg rolls in half on the bias and serve with the ketchup sauce.
Assembled egg rolls can be frozen, then fried straight from the freezer. Fry until golden, about 6 minutes.