The “Automatic Proxy Configuration” url in System Preferences is used to point the clients to a PAC file to set the proxy server when on the Office LAN. Below are some scripts to manage this setting.
1. This version will only set the “Automatic Proxy Configuration” url for the defined services.
2. This version will set the “Automatic Proxy Configuration” url for all services.
If you happen to want to turn off this setting, the below will turn it off for all interfaces:
Whilst the above will turn off the “Automatic Proxy”, it doesn’t clear it. Sadly there is no way via the networksetup command to remove an “Automatic Proxy URL” once set.
If this bothers you, then then below will set the “Automatic Proxy URL” to ” “. It works the same as clearing the URL, but the space will show when typing into the URL field.