supportahm1980
Technical User
Not sure if this is the right forum But I am trying to create a pac file (proxy automatic configuration script)
Basially I want subnets 192.168.1.0 and 192.168.40.0 and 192.168.60.0 to use the proxy. But I am not sure how to do a AND statement in javascript.
Does this look ok?
Basially I want subnets 192.168.1.0 and 192.168.40.0 and 192.168.60.0 to use the proxy. But I am not sure how to do a AND statement in javascript.
Does this look ok?
Code:
function FindProxyForURL(url, host)
{
if (isInNet(myIpAddress(),"192.168.1.0", "255.0.255.0")) && (isInNet(myIpAddress(),"192.168.40.0", "255.0.255.0")) && (isInNet(myIpAddress(),"192.168.160.0", "255.0.255.0")) {
return "PROXY 127.0.0.1:80";
else return "DIRECT";
}