Hi
it needs to be a full URL.
To be compatible with the DNS method of WPAD discovery (used by FF and some others), the URL should not contain sub-paths, e.g.
http://server/wpad.dat rather than
http://server/something/wpad.datThe server name needs to be resolvable by clients, since they will resolve the IP, then connect to it. So you can include an IP in the URL (this is easy option if you only have 1 internal subnet). E.g.
http://192.168.0.1/wpad.datAs for the file itself, a template file is created by WinGate when first requested if it doesn't exist already. This is in resources\WPAD.template
This file you can edit, since you may have requirements for different proxies for different sites or whatever. By default, the content will be
- Code: Select all
function FindProxyForURL(url, host)
{
if ((url.substring(0, 5) == "http:") ||
(url.substring(0, 4) == "ftp:") ||
(url.substring(0, 6) == "https:"))
{
return "PROXY %PROXY%;DIRECT";
}
else
{
return "SOCKS %SOCKS%;DIRECT";
}
}
There are 3 supported replaceable parameters which you can use.
the values for %PROXY% and %IP% are replaced by IP:port of the interface that the request was received on (e.g. the WWW proxy used). This is useful in multi-homed situations, since a client on one subnet may not see a proxy on a different interface.
the value for %SOCKS% is replaced by the IP:port of a running SOCKS server on the same interface.
Adrien