Okay so thanks to this thread https://discussions.apple.com/message/6212689#6212689
I could use PlistBuddy (located in /usr/libexec) to set the key HTTP(S)Enable to 1, and then save it:
sudo /usr/libexec/PlistBuddy -c "Set NetworkServices:46A40FA8-6E7C-xxxx-xxxx-xxxxxx:Proxies:HTTPSEnable 0" /Library/Preferences/SystemConfiguration/preferences.plist
sudo /usr/libexec/PlistBuddy -c Save /Library/Preferences/SystemConfiguration/preferences.plist
but my connection doesn't feel a thing! There's no indication of it working in the browser and when I go to Network Preferences, the HTTP and HTTPS proxies are still unchecked.
Do I need to 'restart' any service for this to take effect?\.
Well I find the final solution (and this is awkwardly turning into an internal dialogue!)
In this same thread: https://discussions.apple.com/message/6212689#6212689 there's notion of a very powerful interface called networksetup located in /usr/sbin/networksetup a quick look at its manual page tells quite a lot about its capabilites.
So the two simple commands for enabling/disabling HTTP and HTTPS are:
$ /usr/sbin/networksetup -setwebproxystate Wi-Fi [on|off]
$ /usr/sbin/networksetup -setsecurewebproxystate Wi-Fi [on|off]
FWIW, some previous (older) discussions of establishing automatic DHCP settings for web proxies, if that might be of interest to you.
The DHCP Option Code Utility tool mentioned there is still posted around the 'net, but it's no longer available via me.com. I don't know that it works on recent versions. I'd see if the wpad stuff works without that.
Some of the older forum postings have problems with the underscores in symbols, and have corresponding mistranslated those as underlining.
The networksetup utility is the program OS X uses to change the network configuration. The Network Preference Pane in system preferences is just a front end to networksetup; networksetup can do everything the preference pane can do (and possibly more).
The parameters you are interested in (from the man page):
Displays Web proxy (server, port, enabled value) info for <networkservice>.
-setwebproxy networkservice domain portnumber authenticated username password
Set Web proxy for <networkservice> with <domain> and <port number>. Turns proxy on. Optionally, specify <on> or <off> for <authenticated> to enable and disable authenticated proxy support. Specify <username> and <password> if you turn authenticated proxy support on.
-setwebproxystate networkservice on | off
Set Web proxy on <networkservice> to either <on> or <off>.
Displays Secure Web proxy (server, port, enabled value) info for <networkservice>.
-setsecurewebproxy networkservice domain portnumber authenticated username password
Set Secure Web proxy for <networkservice> with <domain> and <port number>. Turns proxy on. Optionally, specify <on> or <off> for <authenticated> to enable and disable authenticated proxy support. Specify <username> and <password> if you turn authenticated proxy support on.
-setsecurewebproxystate networkservice on | off
Set SecureWeb proxy on <networkservice> to either <on> or <off>.