Proxy.pac issue?

Hi All
Our internal PC's are supposed to go out onto the internet via our Proxy server.
We need to Bypass the proxyfor some sites and all PC's with an IP address on our local network of 10.0.0.0 subnet mask 255.255.252.0 should be using the proxy server.

The proxy file is as below.





function FindProxyForURL(url, host)
{

 if ((host == "localhost") || (shExpMatch(host, "localhost.*")) || (host == "127.0.0.1")) return "DIRECT";
 if (isPlainHostName(host)) return "DIRECT";
 if (dnsDomainIs(host, ".nsf.org")) return "DIRECT";
 if (dnsDomainIs(host, ".starsasp.com")) return "DIRECT";
 if (dnsDomainIs(host, ".employee-intranet.com")) return "DIRECT";
 if (dnsDomainIs(host, ".nsf-cmi.com")) return "DIRECT";
 if (dnsDomainIs(host, ".callhandling.co.uk")) return "DIRECT";
 if (dnsDomainIs(host, ".cronos.com")) return "DIRECT";
 if (dnsDomainIs(host, ".cmi-plc.com")) return "DIRECT";
 if (dnsDomainIs(host, ".nsf-cmicertification.com")) return "DIRECT";
 if (dnsDomainIs(host, ".itunes.apple.com")) return "DIRECT";
 if (dnsDomainIs(host, ".cmicertification.com")) return "DIRECT";
 if (dnsDomainIs(host, ".secure.logmeinrescue.com")) return "Direct";
 if (shExpMatch(url, "ftp://62.190.62.154/*)) return "Direct";
 if (isInNet(myIpAddress(), "10.0.0.0", "255.255.252.0"))
  return "PROXY webproxy.company.com:8080";
 else
 return "DIRECT";


}

However our PC's do not seem to be hitting the proxy server.  I do not know if they are reading the proxy.pac file and then being directed onto the internet directly or they are not reading the proxy.pac file at all.

We use internet explorer 7 and 8.  In the internet explorer LAN settings we tick the box to "Use automatic configuration script. (See attached screen shot)

If i were to tick the box to "Use a Proxy server for your LAN" then my clients are directed to the Proxy server.  However we do not want to use this method.  We want clients to access the internet by reading the proxy.pac file.

Can anyone see anything wrong with my proxy.pac file? Can anyone suggest any reason why the clients are not reading or using it?.

If i type the address of my proxy.pac file into my web browser then I can open the proxy.pac file.

Regards

Kevan
proxyimage.doc
LVL 1
cmiadminAsked:
Who is Participating?
 
rcflawCommented:
I've experienced similar configuration requirement before, I think your attached browser setting is alright. It might be the problem of the pac scripting issue. I'll suggest to simipify the script for troubleshooting, say ...

function FindProxyForURL(url, host)
{
 if ((host == "localhost") || (shExpMatch(host, "localhost.*")) || (host == "127.0.0.1")) return "DIRECT";
 if (isPlainHostName(host)) return "DIRECT";
 if (isInNet(myIpAddress(), "10.0.0.0", "255.255.252.0"))
  return "PROXY webproxy.company.com:8080";
 else
 return "DIRECT";
}

If the proxy server can be found, then add the individal domain entry to the script.
0
 
cmiadminAuthor Commented:
Hi

Thanks for the link but it does not really point to anything that says why my clients are refusing to use the .pac file that we have.

Any other sugestions ffrom anyone?

Regards

Kevan
0
 
cmiadminAuthor Commented:
Hi

This is exactly what I did yesterday afternoon.  I was about to log in and close the call.

I built the file back up to almost exactly the same as the original, line by line.

Not sure what was wrong with the first file. I have studdied it along side the now working one and can see no difference.  Apart from a coulple of domains that i left out as they are no longer needed.

The now working file looks like this.

function FindProxyForURL(url, host)
{
 if ((host == "localhost") || (shExpMatch(host, "localhost.*")) || (host == "127.0.0.1")) return "DIRECT";
 if (isPlainHostName(host)) return "DIRECT";
 if (dnsDomainIs(host, ".nsf.org")) return "DIRECT";
 if (dnsDomainIs(host, ".cmi-plc.com")) return "DIRECT";
 if (dnsDomainIs(host, ".nsf-cmi.com")) return "DIRECT";
 if (dnsDomainIs(host, ".cmicertification.com")) return "DIRECT";
 if (dnsDomainIs(host, ".nsf-cmicertification.com")) return "DIRECT";
 if (dnsDomainIs(host, ".callhandling.co.uk")) return "DIRECT";
 if (dnsDomainIs(host, ".starsasp.com")) return "DIRECT";
 if (dnsDomainIs(host, ".itunes.apple.com")) return "DIRECT";
 if (dnsDomainIs(host, ".logmeinrescue.com")) return "Direct";
 if (dnsDomainIs(host, ".logmein.com")) return "Direct";
 if (isInNet(myIpAddress(), "10.0.0.0", "255.255.252.0"))
return "PROXY webproxy.nsf-cmi.com:8080";
else
return "DIRECT";
}


Regards

Kevan
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.