Automatische-Proxyconfiguration

Post Reply
Message
Author
Thomas

Automatische-Proxyconfiguration

#1 Post by Thomas »

Hi,
ich habe folgendes Problem.
die Clients sollen grundsätzlich nur über Proxy's ins Internet.
Dabei sollen nach IP-Adressen unterschiedliche Proxy's verwendet werden.

z.B.
192.168.0.1/255.255.255.128 über Proxy1
192.168.0.129/255.255.255.128 über Proxy2
192.168.0.5/255.255.255.255 über Proxy2

Weiß jemand wie dieses Script erstellt werden soll.
Diverse proxy.pac files die ich erstellt habe funktionieren nicht.

Bin für jeden Tipp dankbar.
Thomas

Lukas

Re: Automatische-Proxyconfiguration

#2 Post by Lukas »

Hallo Thomas

das hier müsste klappen :


//
function FindProxyForURL(url, host) {

// get Client IP
var userIp = myIpAddress ();

// Unauthenticated Access
// from within MY Networks
if ( shExpMatch (userIp, "162.158.*")
|| shExpMatch (userIp, "162.159.*")
|| shExpMatch (userIp, "162.250.*")
|| shExpMatch (userIp, "162.251.*")
|| shExpMatch (userIp, "162.156.*")
|| shExpMatch (userIp, "162.255.*")
|| shExpMatch (userIp, "291.154.*")
|| shExpMatch (userIp, "36.260.117.*")
|| shExpMatch (userIp, "191.14.0.*")
|| shExpMatch (userIp, "105.25.285.*") )


// select internet proxy server by client ip address
if (shExpMatch (userIp, "*1") || shExpMatch (userIp, "*3"))
return "PROXY prx-fraint-01.dein.proxy.de:8080; PROXY prx-fraint-02. dein.proxy.de:8080; PROXY verleinix.dein.proxy.de:8080";

if (shExpMatch (userIp, "*2") || shExpMatch (userIp, "*4"))
return "PROXY prx-fraint-02. dein.proxy.de:8080; PROXY prx-fraint-03.inet.cns.fra.dlh.de:8080; PROXY inetprox-02.dein.proxy.de:8080";

if (shExpMatch (userIp, "*5") || shExpMatch (userIp, "*7"))
return "PROXY prx-fraint-03.dein.proxy.de:8080; PROXY prx-fraint-01. dein.proxy.de:8080; PROXY verleinix.inet. dein.proxy.de:8080";

if (shExpMatch (userIp, "*6") || shExpMatch (userIp, "*8"))
return "PROXY inetprox-02.dein.proxy.de:8080; PROXY prx-fraint-02. dein.proxy.de:8080; PROXY prx-fraint-03. dein.proxy.de:8080";

// *9 || *0
return "PROXY verleinix.dein.proxy.de:8080; PROXY prx-fraint-03.dein.proxy.de:8080; PROXY prx-fraint-01.dein.proxy.de:8080";
}

Viel Glück

Gruß

Lukas

Thomas

Re: Automatische-Proxyconfiguration

#3 Post by Thomas »

Hi Lukas,
erst mal danke für die Info. Sieht recht brauchbar aus. Genaugenommen eigentlich das was ich gesucht habe.

Habe ich das soweit richtig verstanden, daß die Var. 0 = "162.158.* und Var. 1 = "162.159.* ist.

Bei

"return "PROXY prx-fraint-01.dein.proxy.de:8080; PROXY prx-fraint-02. dein.proxy.de:8080; PROXY verleinix.dein.proxy.de:8080";

erst Proxy1 dann 2 usw.
Ist das als Backuplösung für Proxy's zu verstehen, wenn ja, weiß jemand eine Aussage über das Zeitverhalten zu machen, wenn einer der erst genannten Proxy's down ist.

Hast Du noch eine Fundstelle aus der weitere Beispiele zu entnehmen sind ?
(Vielleicht gibt es noch ungeahnte Möglichkeiten der Erweiterung)

Und nun noch ne Frage am Rande:
Kann ich das "proxy.pac" auch im cgi-bin ablegen, um zu verhindern, dass die Anwender den Inhalt lesen.


Gruß
Thomas

Lukas

Re: Automatische-Proxyconfiguration

#4 Post by Lukas »

Hallo Thomas,

mail mich mal an unter Gangaman@gmx.li

Gruß

Lukas

Lukas

Re: Automatische-Proxyconfiguration

#5 Post by Lukas »

Sorry kleiner Fehler : Ganjaman@gmx.li

Thomas

Re: Automatische-Proxyconfiguration

#6 Post by Thomas »

Bin weiterhin noch auf der Suche nach Beispieldateien.

Thanks

Post Reply