SecureProxy Help

33 views
Skip to first unread message

ZZATU

unread,
Jun 21, 2010, 7:04:04 PM6/21/10
to pactester
First off I want to thank manugarg and anyone else who contributed to
this project! Awesome Thanks.
So here is my issue, I have setup the proxy to do http on 8080 and
https on 8070; All of the ip addresses work fine for 8080 however,
when i try to test with a https site, the pactester program comes back
and redirects to a proxy of the last secureproxy i have in here
for example
If I test: pactester -p <testpac.pac> -u http://www.google.com - c
172.16.1.1 It comes back to redirect to 5.5.5.5:8070 If I remove the
secureproxy 5.5.5.58070 it will go to the one above it, not matter
what ip address I am putting in. Can someone please see if they notice
anything amiss.

Thanks Much

function FindProxyForURL(url, host)

{

//Set a default proxy if non are returned below

var proxy = "PROXY 1.1.1.1:8080";
var secureproxy = "PROXY 1.1.1.1:8070";



// US Subnets

if (isInNet(myIpAddress(), "172.16.0.0", "255.255.0.0"))

proxy = "PROXY 2.2.2.2:8080";
secureproxy = "PROXY 2.2.2.2:8070";



// AU Subnets

if (isInNet(myIpAddress(), "172.20.0.0", "255.255.0.0"))

proxy = "PROXY 3.3.3.3:8080";
secureproxy = "PROXY 3.3.3.3:8070";


// LA Subnets

if (isInNet(myIpAddress(), "172.24.0.0", "255.255.0.0"))

proxy = "PROXY 4.4.4.4:8080";
secureproxy = "PROXY 4.4.4.4:8070";


// CA Subnets

if (isInNet(myIpAddress(), "172.17.0.0", "255.255.0.0"))

proxy = "PROXY 5.5.5.5:8080";
secureproxy = "PROXY 5.5.5.5:8070";


// Las Vegas Subnets

if (isInNet(myIpAddress(), "172.18.0.0", "255.255.0.0"))

proxy = "PROXY 6.6.6.6:8080";
secureproxy = "PROXY 5.5.5.5:8070";




if (url.substring(0, 5) == "http:")

{

return proxy;

}

if (url.substring(0, 6) == "https:")
{
return secureproxy;


}

if (url.substring(0, 4) == "ftp:") {
return "DIRECT";
}
Reply all
Reply to author
Forward
0 new messages