Cut the tofu into 1-inch squares and drain on a plate between 2 kitchen towels for 30 minutes.
In a large pot, bring 4 quarts water and 2 teaspoons salt to a boil over high heat.
Trim and discard the ends of the bok choy. Chop the white parts and roughly chop the green parts, set aside. Trim and discard the ends of the green onions, slice the white parts in half lengthwise and then chop all the green onions in 3-inch pieces, set aside.
Fill a large frying pan with ½-inch of vegetable oil and heat over high heat. When thoroughly heated (test by dipping corner of tofu in—if it sizzles it is ready), add the tofu and fry until golden brown on the bottom, about 10 minutes. Flip and fry the other side until golden brown. Work in batches and do not crowd the pan.
Using tongs, remove the tofu from the pan and place on a paper towel lined plate. Reserve the oil.
Add the shallots to the oil and fry until golden brown, stirring often, about 5 minutes. Transfer to a paper towel lined bowl. Sprinkle immediately with ¼ teaspoon salt and ¼ teaspoon of the sugar and toss to coat.
Sprinkle immediately with ¼ teaspoon salt and ¼ teaspoon of the sugar and toss to coat.
Add the udon noodles to the boiling water and cook according to the package instructions.
Heat the sesame oil in a separate large skillet over medium-high. Once the oil is hot, add the bok choy and green onions and cook until tender, about 4 minutes. Add the garlic and ginger and cook until fragrant, 1 to 2 minutes more. Add the red curry paste and yellow curry and stir for 30 seconds. Add the coconut milk, soy sauce, the remaining 1 teaspoon salt and the remaining 1 teaspoon sugar.
Whisk until fully combined. Bring to a boil over high heat, then reduce the heat to low and simmer until slightly thickened, 3 to 5 minutes.
Drain the noodles and add them along with the tofu to the sauce. Toss to coat. Serve topped with crispy shallots and extra green onions if desired.