Hey all,

I have been really struggling with proxy.pac now for about a year.
Sometimes it works, but mostly it doesn't.

I have been on craig's site and tried them all, no go.

I have a 172.16/12 network. I have exceptions for all of the subnets. I
have about 20 different proxy.pac files. None of them work. Here is the
basic one.


function FindProxyForURL(url, host)
{
if (shExpMatch(url, "http://principia.mo.techpaths.com*")) {
return "DIRECT";
}
if (isInNet(myIpAddress(), "172.16.0.0", "255.240.0.0"))
return "PROXY 172.20.0.1:8080";
else
return "DIRECT";
}

If I type http://172.22.1.50 in a window, I can not get to it. Fine I
thought, so I created another file.
function FindProxyForURL(url, host)
{
// variable strings to return
var proxy_yes = "PROXY 172.20.0.1:8080";
var proxy_no = "DIRECT";

if (shExpMatch(url, "http://windowsupdate.microsoft.com*")) { return
proxy_no; }
if (shExpMatch(url, "http://v4.windowsupdate.microsoft.com*")) { return
proxy_no; }
if (shExpMatch(url, "http://*csdinside.k12.wi.us*")) { return proxy_no; }
if (shExpMatch(url, "http://*csd-inside.k12.wi.us*")) { return proxy_no; }
if (shExpMatch(url, "http://*csd.k12.wi.us*")) { return proxy_no; }
if (shExpMatch(url, "http://*csdinside.k12.wi.us*")) { return proxy_no; }
if (shExpMatch(url, "http://172.20*")) { return proxy_no; }
if (shExpMatch(url, "http://172.21*")) { return proxy_no; }
if (shExpMatch(url, "http://172.22*")) { return proxy_no; }
if (shExpMatch(url, "http://172.23*")) { return proxy_no; }
if (shExpMatch(url, "http://172.24*")) { return proxy_no; }
// Proxy if PC is on local LAN
if (isInNet(myIpAddress(), "172.20.0.0", "255.255.0.0"))
return "PROXY 172.20.0.1:8080";
if (isInNet(myIpAddress(), "172.22.0.0", "255.255.0.0"))
return "PROXY 172.20.0.1:8080";
if (isInNet(myIpAddress(), "172.23.0.0", "255.255.0.0"))
return "PROXY 172.20.0.1:8080";
if (isInNet(myIpAddress(), "172.24.0.0", "255.255.0.0"))
return "PROXY 172.20.0.1:8080";
if (isInNet(myIpAddress(), "172.25.0.0", "255.255.0.0"))
return "PROXY 172.20.0.1:8080";
if (isInNet(myIpAddress(), "172.27.0.0", "255.255.0.0"))
return "PROXY 172.20.0.1:8080";
else
return "DIRECT";
}

What in the world am I doing wrong?

Here is the one that was working at one time.

function FindProxyForURL(url, host)
{
if (shExpMatch(url,"http://windowsupdate.microsoft.com/*")) { return
"DIRECT"; }

if (shExpMatch(url,"http://v4.windowsupdate.microsoft.com/*")) { return
"DIRECT"; }

if (shExpMatch(url,"http://v4.windowsupdate.microsoft.com")) { return
"DIRECT"; }

if (shExpMatch(url,"http://*.windowsupdate.microsoft.com/*")) { return
"DIRECT"; }

if (shExpMatch(url,"http://download.microsoft.com/*")) { return "DIRECT";
}

if (shExpMatch(url,"http://*csd-inside.k12.wi.us")) { return "DIRECT"; }

if (shExpMatch(url,"http://*csdinside.k12.wi.us")) { return "DIRECT"; }

if (shExpMatch(url,"http://*.csd.k12.wi.us")) { return "DIRECT"; }

if (dnsDomainIs(host, "sirs.com")) { return "DIRECT"; }

if (dnsDomainIs(host, "sodaplay.com")) { return "DIRECT"; }

if (url.substring(0,16) == "http://127.0.0.1") { return "DIRECT"; }

if (url.substring(0,15) == "http://172.16.*") { return "DIRECT"; }

if (url.substring(0,15) == "http://172.17.*") { return "DIRECT"; }

if (url.substring(0,15) == "http://172.18.*") { return "DIRECT"; }

if (url.substring(0,15) == "http://172.20.*") { return "DIRECT"; }

if (url.substring(0,15) == "http://172.21.*") { return "DIRECT"; }

if (url.substring(0,15) == "http://172.22.*") { return "DIRECT"; }

if (url.substring(0,15) == "http://172.23.*") { return "DIRECT"; }

if (url.substring(0,15) == "http://172.24.*") { return "DIRECT"; }

if (url.substring(0,15) == "http://172.25.*") { return "DIRECT"; }

if (url.substring(0,15) == "http://172.26.*") { return "DIRECT"; }

if (url.substring(0,15) == "http://172.27.*") { return "DIRECT"; }

if (url.substring(0,15) == "http://172.28.*") { return "DIRECT"; }

if (url.substring(0,15) == "http://172.29.*") { return "DIRECT"; }

if (url.substring(0,15) == "http://172.30.*") { return "DIRECT"; }

if (url.substring(0,5) == "http:") { return "PROXY 172.20.0.1:8080"; }

if (url.substring(0,6) == "https:") { return "PROXY 172.20.0.1:8080"; }
else
{ return "DIRECT"; }

}