Skip to main content
Solved

Populating the Proxy Fields

  • February 13, 2015
  • 9 replies
  • 25 views

msample
Forum|alt.badge.img+9

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?

Best answer by mvu

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/

9 replies

Forum|alt.badge.img+10
  • Contributor
  • February 13, 2015

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


mvu
Forum|alt.badge.img+20
  • Jamf Heroes
  • Answer
  • February 13, 2015

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/


msample
Forum|alt.badge.img+9
  • Author
  • Valued Contributor
  • February 13, 2015

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


msample
Forum|alt.badge.img+9
  • Author
  • Valued Contributor
  • February 13, 2015

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.


bentoms
Forum|alt.badge.img+35
  • Hall of Fame
  • February 14, 2015

@mvu & @msample, glad it helps!


Forum|alt.badge.img+18
  • Valued Contributor
  • February 14, 2015

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!


bentoms
Forum|alt.badge.img+35
  • Hall of Fame
  • February 14, 2015

@guidotti, no problem & great point.

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


Forum|alt.badge.img+18
  • Valued Contributor
  • February 14, 2015

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


msample
Forum|alt.badge.img+9
  • Author
  • Valued Contributor
  • April 15, 2015

@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?