Heat a dutch oven or wok over medium-high heat and add the oil for frying. Toss the tofu pieces in cornstarch until evenly coated.
After about 2 minutes, when the oil is hot, add the tofu in a single layer making sure there is space between each piece and fry until golden brown and crisp on all sides, turning occasionally. If necessary, depending on the size of the pan, you may need to fry in two batches. Remove the tofu with a slotted spoon and transfer to a wire rack to cool, and drip off any extra grease.
Wipe out the pan and return it to the heat. Add the olive oil, and after 90 seconds when the oil is hot, add the eggplant. Cook, stirring occasionally, until softened and lightly browned.
Add the shallots, garlic, and ginger, stirring continuously for another 2- minutes until fragrant.
Stir in the lime leaves and fresh peppercorns, if using. Add the snap peas and cook until they turn bright green and remain slightly crisp.
In a small bowl, mix the red curry paste, white pepper, tamari, and kecap manis.
Pour the sauce into the pan, stirring to evenly coat the vegetables. Return the fried tofu to the pan and toss to combine. Cook for 1-2 minutes, allowing the sauce to thicken and glaze the tofu and veggies.
Remove from heat and fold in the Thai basil leaves. Serve immediately with jasmine rice, garnished with additional Thai basil and lime wedges if desired.