# Auto config proxy file



## Exothika (Mar 9, 2010)

Several of my clients have asked for a way to have browsers automatically pick up proxy settings if the MacBook is on the local LAN, but not use a proxy server if the PC is not on the local LAN. For instance, moving a laptop from a home network with no proxy server to the office LAN, with a BorderManager server.

I would like to know what can be done to achieve this. A proxy.pac file might work according to my research provided below, but I'm not sure how to script it. Any help will be much appreciated.

More proxy control possibilities:

Another Option (the manual way) is using PROXY.PAC (or simply Proxy auto-configuration (PAC))
- A PAC file contains a JavaScript function "FindProxyForURL(url, host)". This function returns a string with one or more access method specifications. These specifications cause the user agent to use a particular proxy server or to connect directly.

- Multiple specifications provide a fallback when a proxy fails to respond. The browser fetches this PAC file before retrieving other pages. The URL of the PAC file is either configured manually or determined automatically by the Web Proxy Autodiscovery Protocol (WPAP).

- Check out the below article link (though old but the approach is considerable) on how to use the PAC http://nscsysop.hypermart.net/proxypac.html

- Another area which I see may be useful for exploring is the WPAD, check out more examples included in http://www.findproxyforurl.com/wpad_tutorial.html 
and also Option 4 & 5 in
http://nscsysop.hypermart.net/setproxy.html

Thanks!


----------

