function FindProxyForURL(url, host) { if (dnsDomainIs(host, "localhost") || isPlainHostName(host)) { return "DIRECT"; } if (isInNet(myIpAddress(), "129.215.135.0", "255.255.255.0")) { return "PROXY wwwcache.ed.ac.uk:3128"; } if (isInNet(host, "127.0.0.0", "255.0.0.0")) { return "DIRECT"; } if ((isInNet(myIpAddress(), "129.215.0.0", "255.255.0.0") || isInNet(myIpAddress(), "10.0.0.0", "255.0.0.0") || isInNet(myIpAddress(), "188.74.64.0", "255.255.192.0") || isInNet(myIpAddress(), "192.168.58.0", "255.255.255.0") || isInNet(myIpAddress(), "192.168.59.0", "255.255.255.0") || isInNet(myIpAddress(), "212.219.57.128", "255.255.255.128") || isInNet(myIpAddress(), "195.195.244.0", "255.255.255.240") || isInNet(myIpAddress(), "194.62.24.0", "255.255.255.0") || isInNet(myIpAddress(), "193.195.33.0", "255.255.255.0") || isInNet(myIpAddress(), "193.130.15.0", "255.255.255.0") || isInNet(myIpAddress(), "193.63.190.0", "255.255.254.0") || isInNet(myIpAddress(), "193.63.178.0", "255.255.255.0") || isInNet(myIpAddress(), "193.62.81.0", "255.255.255.0") || isInNet(myIpAddress(), "194.81.240.0", "255.255.240.0") || isInNet(myIpAddress(), "194.81.210.0", "255.255.255.0") || isInNet(myIpAddress(), "193.62.95.0", "255.255.255.0") || isInNet(myIpAddress(), "193.62.154.0", "255.255.254.0") || isInNet(myIpAddress(), "193.62.216.0", "255.255.255.0") || isInNet(myIpAddress(), "146.176.190.0", "255.255.255.0") || isInNet(myIpAddress(), "194.81.88.0", "255.255.248.0") || isInNet(myIpAddress(), "193.63.89.0", "255.255.255.0")) && (isInNet(host, "129.215.0.0", "255.255.0.0") || isInNet(host, "10.0.0.0", "255.0.0.0") || isInNet(host, "188.74.64.0", "255.255.192.0") || isInNet(host, "194.81.240.0", "255.255.240.0") || isInNet(host, "194.81.88.0", "255.255.248.0") || dnsDomainIs(host, "www.eaeve.org") || dnsDomainIs(host, ".thirdforce.com") || dnsDomainIs(host, ".eastman.net.uk") || dnsDomainIs(host, ".mhie.ac.uk"))) { return "DIRECT"; } if (dnsDomainIs(host, "wol.is.ed.ac.uk")) { return "DIRECT"; } if (dnsDomainIs(host, "idp.ed.ac.uk")) { return "DIRECT"; } if ((isInNet(myIpAddress(), "129.215.0.0", "255.255.0.0") || isInNet(myIpAddress(), "188.74.64.0", "255.255.192.0") || isInNet(myIpAddress(), "212.219.57.128", "255.255.255.128") || isInNet(myIpAddress(), "195.195.244.0", "255.255.255.240") || isInNet(myIpAddress(), "194.62.24.0", "255.255.255.0") || isInNet(myIpAddress(), "193.195.33.0", "255.255.255.0") || isInNet(myIpAddress(), "193.130.15.0", "255.255.255.0") || isInNet(myIpAddress(), "193.63.190.0", "255.255.254.0") || isInNet(myIpAddress(), "193.63.178.0", "255.255.255.0") || isInNet(myIpAddress(), "193.62.81.0", "255.255.255.0") || isInNet(myIpAddress(), "194.81.240.0", "255.255.240.0") || isInNet(myIpAddress(), "194.81.210.0", "255.255.255.0") || isInNet(myIpAddress(), "193.62.95.0", "255.255.255.0") || isInNet(myIpAddress(), "193.62.154.0", "255.255.254.0") || isInNet(myIpAddress(), "193.62.216.0", "255.255.255.0") || isInNet(myIpAddress(), "146.176.190.0", "255.255.255.0") || isInNet(myIpAddress(), "194.81.88.0", "255.255.248.0") || isInNet(myIpAddress(), "193.63.89.0", "255.255.255.0")) && (url.substring(0, 6) == "https:") && !dnsDomainIs(host,"windowsupdate.microsoft.com")) { return "DIRECT"; } return "PROXY wwwcache.ed.ac.uk:3128"; }