eean Posted February 22, 2008 Posted February 22, 2008 I've just re-set up my auto proxy file on a new server after I migrated from a win 2k server to win 2003. I noticed it was really slow when it was using the auto proxy file. I'm not sure if it was this slow before. This is my old wpad.dat and proxy.pac file: function FindProxyForURL(url,host) { if(isPlainHostName(host)|| isInNet(host,"10.39.0.0","255.255.254.0")) return "DIRECT"; else return "PROXY 10.39.208.69:8080; DIRECT"; } This should work out if the destination has a local IP address and, if not, send it to the proxy. After some fiddling, I took out the bit that works out if it is local and now it runs fine: function FindProxyForURL(url,host) { return "PROXY proxy:8080; DIRECT"; } But now, of course, if I try to access a local resource it can't find it. Is there a more efficient way of writing my original file? (I need to use automatically detect settings, so other GP or reg based methods are no good).
Oops_my_bad Posted February 23, 2008 Posted February 23, 2008 (edited) Here's our proxy.pac. Probably not the most efficient but seems to work OK function FindProxyForURL(url, host) { if (dnsDomainIs(host, "webmail.school.sch.uk") || isInNet(host, "10.15.228.0", "255.255.252.0")) return "DIRECT"; else return "PROXY 10.15.x.x:80; DIRECT"; } This basically assumes anything 10.15.228.0 to 10.15.231.255 is local and everything else go via the proxy. I just want to pimp it a bit now so it uses a different proxy when connecting from certain IP's ;-) Edited February 23, 2008 by TeddyKGB
eean Posted February 23, 2008 Author Posted February 23, 2008 (edited) Hmm... looks pretty similar to mine. Although, I've just noticed that my network address is wrong, so that won't help! When I use the original script, it is noticeably slower - like it could take several seconds after clicking on the link to go to the page, and then, each graphic etc.. takes a few seconds longer. When the proxy is hard coded it is instant. Really, I want it to say "If address is one word, like server, or suiteprinter then go direct, else go to proxy" - that should be less effort for it to work out? In answer to your question, I think this function may help: myIpAddress() - If you google it along with proxy auto config you get lots of threads of people struggling to get it to work! Edited February 23, 2008 by eean
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now