3

I have a requirement to set a test machine which utilises automatic proxy configuration using a WPAD.DAT file. This is to replicate a customer environment (that we can't use for testing) so we may develop a fix for one of our software packages.

I have no problem with AD / IIS / Proxy's etc, however I know next to nothing about automatic configuration script and how to correctly set it up.

My current setup is a follows:

1 x IIS which is hosting a wpad.dat file

1 x windows 7 unit, in internet options I've selected use automatic configuration script and pointed the address field to the wpad.dat file via the HTTP address. IP settings are static with only a static IP, valid subnet and internal DNS server setup. (No gateway)

My wpad.date file is :

function FindProxyForURL(url, host)
{ if (isPlainHostName(host))
return "DIRECT";
else
return "PROXY 192.168.10.103:808";
}

The proxy server is CCProxy which works fine when I point Internet Explorer 'proxy server' settings to it.

When I browse any page on my lab machine the browse fails. The proxy server does not receive any hits. Wireshark running on the proxy server also does not register any communicate from this IP.

What do I need to do different to setup this test on one machine?

1
  1. Test if the client can download the WPAD.DAT file using IE. If not, it can't load the WPAD.DAT file
  2. Use telnet or curl or something to confirm that the proxy at 192.168.10.103 is actually listening on TCP 808
  3. I think your syntax might be off? My PAC files don't have an else statement where you have one. If you're going to use else, you might need to wrap the return statement in another set of curly brackets. When in doubt, use the Google pactester.

Read this whole site : http://www.proxypacfiles.com/proxypac/

  • 1
    Turns out it was the syntax in my DAT file. – Damo Dec 17 '13 at 17:26
  • That will always bite you. It's javascript, and like any language, if you typo it, it's broken. Always run the pactester when making changes and test your important conditions. Script that, or even automate it, to make it easy on yourself. – mfinni Dec 17 '13 at 17:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.