Skip to main content

Having a little trouble populating the proxy fields under 10.9. When I check the script, everything looks ok but I'm not sure:



networksetup -setautomaticproxyconfiguration http://xxxx-pac.company.com:81/company-proxy.pac



I'd like for this to auto-populate, I've also created a policy for it. Thoughts?

the syntax is
networksetup -setautoproxyurl networkservice url



so you'll need to correct the flag and specify a networkservice or adapter



networksetup -setautoproxyurl Ethernet http://xxxx-pac.company.com:81/company-proxy.pac


I used the link below from MacMule. Saved us.



https://macmule.com/2014/12/07/how-to-change-the-automatic-proxy-configuration-url-in-system-preferences-via-a-script/


Got it, thanks htse. I'll test it with both Wi-Fi and Thunderbolt Ethernet fields. I believe Thunderbolt should look like this:



networksetup -setautoproxyurl Thunderbolt-Ethernet http://xxxx-pac.company.com:81/company-proxy.pac


Very nice, mvu. This works like a charm...Thanks, this is a life saver!



The only thing that needs to be inserted into the script is the URL address.


@mvu & @msample, glad it helps!


One thing to point out is that you need to have the interfaces already created.
For instance, when you are getting MacBooks that will later be plugged into a Thunderbolt Display, you won't have that "Display Ethernet" interface yet. What I do is just plug them into a common one in my lab and then run the script.
You could run it later when they get to their final destination upon install, also. Thanks to @bentoms for the original code!


@guidotti, no problem & great point.



We used to run it once a day & have it triggerable via self service too.


Yes, I find myself using Self-Service for a lot of things nowadays!


@mvu I've recently been testing with the JAMF script created for web proxy under 10.10, but it has not been auto populating the web proxy field. It works well under 10.9.



Anyone seeing similar results?