function FindProxyForURL(url, host) { if (isInNet(host, "193.60.4.131", "255.255.255.255")) return "DIRECT"; //MAH TEst //Ignore Local Servers if (isPlainHostName (host) || dnsDomainIs (host,".staffs.ac.uk") || dnsDomainIs (host,".staffs.org") || dnsDomainIs (host,".soc.staffs.ac.uk") || dnsDomainIs (host,".sashalibrary.nhs.uk") || dnsDomainIs (host,".careersfairs.org.uk") || dnsDomainIs (host,".educationuk.cn") || dnsDomainIs (host,".innov.co.uk") || dnsDomainIs (host,".jaysoul.co.uk") || dnsDomainIs (host,".ruteenwise2.com") || dnsDomainIs (host,".learningstaffordshire.ac.uk") || dnsDomainIs (host,".tlcintra.net") || dnsDomainIs (host,".nted.org.uk") || dnsDomainIs (host,".sulc.ac.uk") || dnsDomainIs (host,".deed.ac.uk") || dnsDomainIs (host,".surf.ac.uk") || dnsDomainIs (host,".yozzer.com") || dnsDomainIs (host,".bucks-retinue.org.uk") || dnsDomainIs (host,".newcastlelight.co.uk") || dnsDomainIs (host,".sulc.net") || dnsDomainIs (host,".sulc.org") || dnsDomainIs (host,".renewnorthstaffs.gov.uk") || dnsDomainIs (host,".lbv.org.uk") || dnsDomainIs (host,".suegothamchildcare.co.uk") || dnsDomainIs (host,".interculturalmentoring.org.uk") || dnsDomainIs (host,".careersfairs.org.uk") || dnsDomainIs (host,".staffssetpoint.co.uk") || // createthedifference.co.uk appears to be hosted externally now - RMR 12.06.09 // dnsDomainIs (host,".createthedifference.co.uk") || dnsDomainIs (host,"staffsmc.siso.uk.com") || dnsDomainIs (host,"staffsmc.siso.org.uk") || localHostOrDomainIs(host,"127.0.0.1")) return "DIRECT"; //workaround(!) for staffsunion.com if (isPlainHostName (host) || dnsDomainIs (host,"www.staffsunion.com")) return "PROXY cruscache1-int.staffs.ac.uk:3128; PROXY cruscache2-int.staffs.ac.uk:3128; DIRECT"; //LBV if (isInNet(myIpAddress(), "195.195.109.128", "255.255.255.128")) return "PROXY cruscachext1.staffs.ac.uk:3128; DIRECT"; //COMNET if (isInNet(myIpAddress(), "195.58.68.1", "255.255.255.0")) return "DIRECT"; //ROYAL SHREWSBURY HOSPITAL if (isInNet(host, "10.128.0.0", "255.255.0.0") || isInNet(host, "194.227.83.0", "255.255.255.0")) return "DIRECT"; //RESNET if (isInNet(myIpAddress(), "195.194.27.0", "255.255.255.0") || isInNet(myIpAddress(), "212.219.225.0", "255.255.255.0") || isInNet(myIpAddress(), "212.219.226.0", "255.255.255.0") || isInNet(myIpAddress(), "212.219.227.0", "255.255.255.0") || isInNet(myIpAddress(), "212.219.228.0", "255.255.255.0") || isInNet(myIpAddress(), "193.60.124.0", "255.255.255.0") || isInNet(myIpAddress(), "193.60.125.0", "255.255.255.0") || isInNet(myIpAddress(), "194.80.159.0", "255.255.255.128")) return "PROXY cruscacheres1-int.staffs.ac.uk:3128; PROXY cruscache1-int.staffs.ac.uk:3128; PROXY cruscache2-int.staffs.ac.uk:3128; DIRECT"; if (url.substring(0, 6) == "https:") return "PROXY cruscache1-int.staffs.ac.uk:3128; PROXY cruscache2-int.staffs.ac.uk:3128; DIRECT"; //WORKAROUND For Orange Webmail - nw 05.08.08 if (shExpMatch(url, "http://email*.orange.co.uk*")) return "PROXY cruscache2-int.staffs.ac.uk:3128; PROXY cruscache1-int.staffs.ac.uk:3128; DIRECT"; if (url.substring(0, 5) == "http:" || url.substring(0, 4) == "ftp:") if (url.length % 2 == 1) return "PROXY cruscache1-int.staffs.ac.uk:3128; PROXY cruscache2-int.staffs.ac.uk:3128; DIRECT"; else if (url.length % 2 == 0) return "PROXY cruscache2-int.staffs.ac.uk:3128; PROXY cruscache1-int.staffs.ac.uk:3128; DIRECT"; else return "PROXY cruscache1-int.staffs.ac.uk:3128; PROXY cruscache2-int.staffs.ac.uk:3128; DIRECT"; else return "DIRECT"; }