Proxy-PAC Configuration -  referencing source AND destination

chintuvj
chintuvj used Ask the Experts™
on
I need to forward traffic to a proxy based on source and destination.... All the current rules are singular in the sense that it is source OR destination IP OR domain, etc..

What is the syntax I would need to apply if I wanted source 10.5.5.10  destination 200.200.200.200 to go to proxy server 8.9.10.11:8080.

Thanks
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Commented:
give this a try, i hvae not teste it myself.
function FindProxyForURL(url, host)
{
if ((isInNet(myIpAddress(), "10.5.5.10", "255.255.255.255") && (shExpMatch(url, "http://200.200.200.200"))
return "PROXY 8.9.10.11:8080";
}
 
Top Expert 2015

Commented:
myIpAddress is 0.0.0.0 or empty in some configurations.

Author

Commented:
i ended up using

if (isInNet(myIpAddress(), "10.24.65.54", "255.255.255.255") && (shExpMatch(url, "http://207.207.207.1"))) {
      return "172.16.127.27:8080";
      }

But your solution seems to work and led me in the right direction.
Top Expert 2015

Commented:
return "172.16.127.27:8080"

It is plain WRONG, you have to return PROXY, SOCKS or DIRECT

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial