So apparently talking to fabrice, you should be able to add:
to b2g.js to change the proxy server.
You can also do this in the Simulator.
From WebIDE > Runtime > Device Preferences
Add the settings (same as you would by editing the js file)
There’s a pref added so that it affects just the browser/ftp on b2g:
Also to note, if you download the nightly and connect the device, you can change the device settings with the webide.