Evolution #1431
Configuration automatique du proxy avec wpad
100%
Description
Mail de Lionel Caylat du 16 Mar 2010
Bonjour,
Voici en pièce jointe les fichiers qui nous permettent de mettre en
place une solution de proxy automatique qui fonctionne avec :
- Mozilla Firefox
- Internet Explorer 6, 7 et 8
(testé avec Windows 2000/XP/Vista/Seven et Ubuntu 9.04/9.10)
Dans le config.eol, l'IP correspond au serveur, en fait, j'ai un script
qui me remplit mes .eol (c'est assez barbare mais je scripte comme un
manchot avec des mains).
Un moment, j'avais patché aussi le fichier hosts mais une mise à jour
avait mis mon patch en l'air donc j'ai préféré trouver une solution plus
durable.
Cordialement.
History
#1 Updated by Klaas TJEBBES about 10 years ago
Exemple d'un fichier "wpad.dat" multi-zones :
function FindProxyForURL(url, host)
{
// eth1
if (isInNet(myIpAddress(), "10.21.11.0", "255.255.255.0")){
return "PROXY 10.21.11.1:3128";
// eth2
} else if (isInNet(myIpAddress(), "10.121.16.0", "255.255.248.0")) {
return "PROXY 10.121.16.1:3128";
// eth3
} else if (isInNet(myIpAddress(), "10.21.142.128", "255.255.255.224")) {
return "PROXY 10.21.142.129:3128";
// autres reseaux
} else {
return "DIRECT";
}
}
#2 Updated by Klaas TJEBBES about 10 years ago
Pour la compatibilité PAC (proxy auto-config) il faut aussi créer un lien symbolique de "wpad.dat" vers "proxy.dat".
http://en.wikipedia.org/wiki/Proxy_auto-config
#3 Updated by Emmanuel GARETTE about 10 years ago
Pour quel navigateur ?
Parce que ca fonctionne sur IE et Firefox a priori.
#4 Updated by Emmanuel GARETTE about 10 years ago
Modification de Lionel Caylat pour exclure le FTP :
function FindProxyForURL(url, host) {
if (( isInNet(host, "127.0.0.1", "255.255.255.255"))||(url.substring(0, 4) == "ftp:")) {
return "DIRECT"; }
else return "PROXY 192.168.0.254:3128"; }
#5 Updated by Joël Cuissinat about 10 years ago
- % Done changed from 0 to 30
#6 Updated by Laurent Flori about 10 years ago
- Target version changed from EOLE 2.3 RC4 to EOLE 2.3 Stable
#7 Updated by Joël Cuissinat almost 10 years ago
- Status changed from Nouveau to Résolu
- % Done changed from 30 to 100
=> à tester
#8 Updated by Jerome Soyer almost 10 years ago
- Status changed from Résolu to Fermé