OS X, iOS, configuration management and stuff

OS X comes with a tool called networksetup, that lets you change networksettings on OS X from the command line. Among other things, it can be used to set proxy settings for network interfaces, even when the options are not visible in the GUI.

Use man networksetup to see all options to networksetup. There are options to show all different settings for various proxies.

To turn on or off a proxy, use networksetup -setsecurewebproxystate 'iPad USB' on. This command turns on HTTPS-proxy for the iPad USB interface. You can use the same command to turn off.

The full command to change settings for the proxy is networksetup -setsecurewebproxy <networkservice> <domain> <port number> <authenticated> <username> <password> The <domain> and <portnumber> is the hostname and port of the proxy.