+ Post New Thread
Results 1 to 3 of 3
Windows Thread, What does your wpad (Auto Proxy file) look like? in Technical; I've just re-set up my auto proxy file on a new server after I migrated from a win 2k server ...
  1. #1
    eean's Avatar
    Join Date
    May 2006
    Location
    Seoul
    Posts
    572
    Thank Post
    71
    Thanked 57 Times in 41 Posts
    Rep Power
    31

    What does your wpad (Auto Proxy file) look like?

    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:
    Code:
    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:
    Code:
    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).

  2. #2
    Oops_my_bad's Avatar
    Join Date
    Jan 2007
    Location
    Man chest hair
    Posts
    1,738
    Thank Post
    438
    Thanked 53 Times in 50 Posts
    Rep Power
    31
    Here's our proxy.pac. Probably not the most efficient but seems to work OK

    Code:
    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 ;-)
    Last edited by Oops_my_bad; 23rd February 2008 at 06:08 PM.

  3. #3
    eean's Avatar
    Join Date
    May 2006
    Location
    Seoul
    Posts
    572
    Thank Post
    71
    Thanked 57 Times in 41 Posts
    Rep Power
    31
    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!
    Last edited by eean; 23rd February 2008 at 06:19 PM.



SHARE:
+ Post New Thread

Similar Threads

  1. Proxy switch "proxy on" & " proxy off" software
    By GavRob in forum Network and Classroom Management
    Replies: 20
    Last Post: 30th July 2007, 11:05 PM
  2. WPAD.DAT
    By k-strider in forum Coding
    Replies: 0
    Last Post: 4th July 2007, 04:12 PM
  3. UPS auto shutdown
    By adamyoung in forum How do you do....it?
    Replies: 14
    Last Post: 4th July 2007, 10:50 AM
  4. Auto logoff by GPO?
    By contink in forum How do you do....it?
    Replies: 8
    Last Post: 31st March 2007, 11:12 PM
  5. Replies: 4
    Last Post: 23rd March 2006, 07:27 AM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •