On my Galaxy Note 2 phone (Android of course), is it possible to edit the hosts file so that it resolves 'example.com' to a public IP BUT resolves it to a local private IP if connected to wifi with a specific SSID? i.e. connected at home to the wifi, it resolves a domain name to a local server on the LAN, but anyplace else it resolves it to the public IP?
I'm guessing it'd be hard at the very least, if it's even possible, but do I have any options here (either hosts, or some other way)? I've got shell access, and root access, so I can edit pretty much anything that needs to be.