Showing posts with label wpad. Show all posts
Showing posts with label wpad. Show all posts

Tuesday, 19 March 2013

Set Automatic Proxy Configuration through Command line in OS X 10.7

It took me a while to find it, but to set the Automatic Proxy Configuration url and tick the box through command line I found this helpful post which describes a script on how to do it.

First you need to find which network interface you want to change:

networksetup -listallnetworkservices
Ethernet

Use this in the command:
networksetup -setautoproxyurl Ethernet http://wpad.your.path.here/wpad.dat
By adding a url it automatically switches it on. To check:
networksetup -getautoproxyurl Ethernet
Simples. Don't know why it took me so long to find it. Don't think it's in the man page for networksetup for some reason!

Friday, 12 October 2012

Firefox not picking up the wpad auto config file

I've decided to setup firefox on the new Windows image but it turns out it doesn't like the options:

  • Use system proxy settings
    • this is the one I prefer as I can set it using group policy/workgroup manager
  • Auto-detect proxy settings for this network
Whenever either of these are ticked you cannot browse the internet.

Had a quick search and think I've found the problem. The browser looks for the file:

http://wpad/wpad.dat

Now when I typed this in the address bar of; Safari, Internet Explorer and Google Chrome; they all downloaded the wpad.dat file. But Firefox was the odd one out as it just displayed the "Unable to connect" and "Problem loading page" errors.

Did a quick search and found this Knowledge Base Article describing how all other browser now use DHCP to help find this address, but Firefox only uses DNS. Also found it here in a blog and more importantly in Mozillas bug reports here (takes a while to load).

The fix apparently is to put a "DNS record for the WPAD server" (described here under 7.2.2)