i'm trying to create a PAC file (Proxy Automatic Configuration)...so that i can instate a little automatic proxy redundancy as well as automatic configuration (so i don't have to walk around as much when there's a bunch of goobers visiting work)
i've found a lot of good resources on PAC files...but it's all greek to me as i only know two things about JS....diddely and squat
here's my basic PAC (coincidentally...the only one i've been able to get working)
function FindProxyForURL(url, host) { if (isPlainHostName(host) || dnsDomainIs(host, ".<MyDomain>")) return "DIRECT"; else return "PROXY <WebFilterDNSNameAndPort>; <SecondaryProxyDNSNameAndPort>; DIRECT"; }
i can direct my IE to this PAC file for configuration then test at http://www.proxyserv...-detector.shtml and it will show that i am indeed using the first proxy in the list (after the return "proxy" deal...) and if i replace the "mydomain" with the domain of that testing site (proxyserverprivacy.com) then it will show that i am indeed not using the proxy...so i know it's reading that line and parsing the logic
however...if i add any more domain names in the first section (which is supposed to be a list of things that can be accessed directly instead of via proxy) then the tests fail and the proxy isn't being applied....i assume this is because i don't know anything about how to write JS...would i need to put more IF statements in there? or maybe an or? does JS do or statements? like if the domain matches this, OR, this OR this then do this else do the other thing?
any help would be appreciated