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:
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 12:11, local time: 2024/12/27 18:52,
3.146.178.220:LOG IN
|
©2024 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? <A HREF="http://linistepper.com/Techref/app/inet/wpad_dat.htm"> WPAD (Web Proxy Auto Discovery)</A> |
Did you find what you needed? |