I'd like to be a man-in-the-middle between my iPhone and the internet for debugging purposes. In particular, I'd like to convince my iPhone that a particular host on the internet is my local development machine, and that it should not actually connect out to the net (so the app believes it's contacting a production server when in fact it's hitting a local box).
I can disable 3G and use my Mac's ad-hoc WiFi, but adding
/etc/hosts entries of course won't route requests to the local machine, since it's just doing NAT, not handling DNS or other protocols on behalf of the phone.
The only thing I can think of is to jailbreak it and mess with the hosts file on the device, but I'd rather not do that if I can avoid it. Can anyone think of another way of going about this?