Step 1Place the tofu blocks between paper towels and press gently to remove excess liquid.
Step 2In a large skillet or cast-iron pan, warm the oil over medium-high heat until shimmering. Season both sides of the tofu with salt and place in the pan; sear without moving until the contact side is browned, about 4 minutes. Turn the pieces over and sear the other side until browned, about 3 minutes. Transfer the tofu to a plate.
Step 3Carefully add 1/2 cup water, the sugar and star anise to the pan. (The mixture will sputter and steam.) Cook, stirring, until the syrup is reduced and turns deep amber, 4 to 5 minutes. Pour in the stock carefully (again being mindful of sputtering), Shaoxing, soy sauce, garlic, ginger and chile and cook, stirring frequently, until reduced, syrupy and glossy, 5 to 7 minutes.
Step 4Use your fingers to break the tofu into 1/2-inch pieces, return to the pan and add the scallion whites. Toss to coat with the sauce and cook until warmed through, 2 to 3 minutes. Remove and discard the star anise and dried chile. Garnish with scallion greens and serve immediately with steamed rice.