please dont rip this site

WPAD (Web Proxy Auto Discovery)

WPAD.DAT is a Javascript program to automatically configure proxy servers on a per-URL basis.

Apparently uses the format of the Netscape PAC (Proxy Auto Config) file. The proxy autoconfig file is written in JavaScript. The file must define the function:

        function FindProxyForURL(url, host)
        {
            ...
        }

which will be called by the Navigator in the following way for every URL that is retrieved by it:

        ret = FindProxyForURL(url, host);

where:

url
the full URL being accessed.
host
the hostname extracted from the URL. This is only for convenience, it is the exact same string as between :// and the first : or / after that. The port number is not included in this parameter. It can be extracted from the URL when necessary.
ret
(the return value) a string describing the configuration. The format of this string is as follows:
null
If the string is null, no proxies should be used.
DIRECT
Connections should be made directly, without any proxies.
PROXY host:port
The specified proxy should be used.
SOCKS host:port
The specified SOCKS server should be used.

If there are multiple semicolon-separated settings, the left-most setting will be used, until the browser fails to establish the connection to the proxy. In that case the next value will be used, etc.

In the definition of the function, some predefined functions can be called:

Here is an example that hopes to show why this can be useful. In a large organizatoin running proxy servers for all web access, this script distributes load between 4 proxy servers. One for all .com request, one for .edu requests, another for all other requests and a fourth which is used if any of the first 3 fail to respond.

    function FindProxyForURL(url, host)
    {
        if (isPlainHostName(host) || dnsDomainIs(host, ".mydomain.com"))
            return "DIRECT";
        else if (shExpMatch(host, "*.com"))
            return "PROXY proxy1.mydomain.com:8080; " +
                   "PROXY proxy4.mydomain.com:8080";
        else if (shExpMatch(host, "*.edu"))
            return "PROXY proxy2.mydomain.com:8080; " +
                   "PROXY proxy4.mydomain.com:8080";
        else
            return "PROXY proxy3.mydomain.com:8080; " +
                   "PROXY proxy4.mydomain.com:8080";
    }

See also:


file: /Techref/app/inet/wpad_dat.htm, 5KB, , updated: 2005/12/21 13:11, local time: 2017/9/19 13:36,
TOP NEW HELP FIND: 
54.81.59.211:LOG IN

 ©2017 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions?
Please DO link to this page! Digg it! / MAKE! / 

<A HREF="http://techref.massmind.org/techref/app/inet/wpad_dat.htm"> WPAD (Web Proxy Auto Discovery)</A>

After you find an appropriate page, you are invited to your to this massmind site! (posts will be visible only to you before review) Just type in the box and press the Post button. (HTML welcomed, but not the <A tag: Instead, use the link box to link to another page. A tutorial is available Members can login to post directly, become page editors, and be credited for their posts.


Link? Put it here: 
if you want a response, please enter your email address: 
Attn spammers: All posts are reviewed before being made visible to anyone other than the poster.
Did you find what you needed?

 

Welcome to massmind.org!

 

Welcome to techref.massmind.org!

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

  .