Configurazione automatica proxy

Ottimo sito di riferimento:

http://findproxyforurl.com/wpad_tutorial.html

http://blog.freyguy.com/archives/2006/03/01/proxy-auto-detect-ie-and-firefox/

http://techblog.mirabito.net.au/?p=21

Esempio

cat wpad.dat

function FindProxyForURL(url, host)
{

if (isInNet(host, “172.21.0.0”, “255.255.0.0”)){
return “DIRECT”;
}

if (isInNet(host, “172.17.0.0”, “255.255.0.0”)){
return “DIRECT”;
}
if (isInNet(host, “172.22.0.0”, “255.255.0.0”)){
return “DIRECT”;
}
if (isInNet(host, “192.168.0.0”, “255.255.255.0”)){
return “DIRECT”;
}
if (isInNet(host, “10.10.0.0”, “255.255.0.0”)){
return “DIRECT”;
}
if (isInNet(host, “159.213.89.64”, “255.255.255.224”)){
return “DIRECT”;
}

if (dnsDomainIs(host, “.pippo.it”)) {
return “DIRECT”;
}
if (dnsDomainIs(host, “.pluto.it”)) {
return “DIRECT”;
}

if (
shExpMatch(host,”*.pippo.it”) ||
shExpMatch(host,”www.topolino.it”)
) {
return “DIRECT”;
}

return “PROXY squid.prvprato1:3128; PROXY squid01.prvprato1:3128; PROXY squid02.prvprato1:3128″;
// DIRECT”;
}