10 July 2009 0 Comments

Notes on Proxy AutoConfiguration Scripts

I had someone ask me for help writing a Proxy AutoConfiguration script today.  PAC files are basically simple JavaScript files that expose one function FindProxyForURL(), that returns a string containing a list of one or more proxies which should be used to reach a given hostname. If no proxy should be used, the function returns “DIRECT.”  PAC files may be either manually specified (Tools / Internet Options / Connections / Lan Settings / Automatic configuration script) or automatically discovered using WPAD  (controlled via the “Automatically Detect Settings” checkbox on the same dialog). Back in the Vista timeframe, the WinINET team added some new functionality to ensure that PAC files could properly work in an IPv6 environment.  A summary of their changes can be found in this blog post: http://blogs.msdn.com/wndp/articles/IPV6_PAC_Extensions_v0_9.aspx As an aside: PAC files can have an (often unexpected) impact on Zone Determination, as I described almost 4 years ago ( sheesh, time flies! ).  -Eric

Here is the original: 
Notes on Proxy AutoConfiguration Scripts

If you liked this post, buy me a Coffee.

Leave a Reply