function FindProxyForURL(url, host) { var proxy_yes = "PROXY 10.10.10.15:8080"; var proxy_no = "DIRECT"; /* Opera crash's with the dnsresolve command so match opera traffic first */ if (shExpMatch(host, "*operapp*")) return proxy_no; var resolved_ip = dnsResolve(host); /* Force traffic for the Barracuda block page to be proxied */ if (shExpMatch(resolved_ip, "172.27.72.27")) return proxy_yes; /* All traffic going to internal addresses go direct */ if (isPlainHostName(host) || isInNet(resolved_ip, "10.0.0.0", "255.0.0.0") || isInNet(resolved_ip, "172.16.0.0", "255.240.0.0") || isInNet(resolved_ip, "192.168.0.0", "255.255.0.0") || isInNet(resolved_ip, "127.0.0.0", "255.255.255.0") || dnsDomainIs(host, "localhost")) return proxy_no; /* External destinations that need to bypass proxy */ if(shExpMatch(host,"*www.networkgaming.com.au*") || shExpMatch(host,"59.167.228.1") || shExpMatch(host,"gw0.pceftpos.com") || dnsDomainIs(host, ".compassportal.com.au") || dnsDomainIs(host, ".compassportal.com") || shExpMatch(host, "*thematrix.mochahost.com*") || shExpMatch(host, "*matrix.my-hosting-panel.com*") || shExpMatch(host, "203.25.104.51") || shExpMatch(host, "203.52.118.19") || shExpMatch(host, "203.42.151.57") || shExpMatch(host, "zaphod.prot.com.au")) return proxy_no; // Catchall for NG HelpDesk in case they manage to get this far if(isInNet(resolved_ip, "192.9.200.0", "255.255.255.0")) return proxy_no; return proxy_yes; }