function FindProxyForURL(url, host) { if ( shExpMatch(url, "https://int.login.mycompany.org/*") || shExpMatch(url, "https://login.mycompany.org/*") || shExpMatch(url, "https://entw.mycompany.org/*") ) return "PROXY proxy.web.mycompany.org:8080; DIRECT"; if (shExpMatch(host,"highsecurehost.com")) return "PROXY highsecure.services.mycompany.org:1234"; if ( shExpMatch(url, "*.companyfriends.org*") || shExpMatch(url, "proxy.mycompany.org*") || shExpMatch(url, "proxy.web.mycompany.org*") || shExpMatch(url, "*.otherfriends.org/*") || shExpMatch(url, "*localhost*") || isInNet(host, "10.0.0.0", "255.0.0.0") || isInNet(host, "127.0.0.0", "255.0.0.0") || isInNet(host, "192.168.1.0", "255.255.255.0")) return "DIRECT"; if (shExpMatch(url, "*.specialservice.org/*")) return "PROXY proxy.mycompany.org:7070; DIRECT"; if (dnsResolve("ntp.mycompany.org") == "10.1.99.99" || dnsResolve("ntp.mycompany.org") == "10.100.199.199") return "PROXY proxy.web.mycompany.org:8080"; return "PROXY proxy.web.mycompany.org:8080"; }