Projet

Général

Profil

wpad.dat

Guillaume PITARD, 09/02/2012 09:02

Télécharger (710 octets)

 
1
function FindProxyForURL(url, host)
2
{
3
// GLOBAL
4

    
5
if (
6
%if %%adresse_ip_eth0[0:4] == "10.1"
7
        isInNet(host, "%%adresse_ip_pub", "255.255.255.255") ||
8
%else
9
        isInNet(host, "%%adresse_network_eth0", "%%adresse_netmask_eth0") ||
10
%end if
11
        %for %%ip_httpsbypass in %%fw_httpsbypass_ip
12
	isInNet(host, "%%ip_httpsbypass", "255.255.255.255") ||
13
	%end for
14
	isInNet(host, "161.48.0.0", "255.255.224.0") ||
15
        isInNet(host, "192.168.0.0", "255.255.0.0") ||
16
        isInNet(host, "172.16.0.0", "255.240.0.0") ||
17
        isInNet(host, "10.0.0.0", "255.0.0.0") ||
18
	isInNet(host, "127.0.0.0", "255.0.0.0")
19
) {
20
        return "DIRECT";
21
} else {
22
        return "PROXY %%adr_VIP_Proxy:3128";
23
        }
24
}