Jump to content

mücke

Members
  • Gesamte Inhalte

    3
  • Registriert seit

  • Letzter Besuch

Profile Fields

  • Member Title
    Newbie

Fortschritt von mücke

Rookie

Rookie (2/14)

  • Erste Antwort
  • Erster eigener Beitrag
  • Eine Woche dabei
  • Einen Monat dabei
  • 1 Jahre dabei

Neueste Abzeichen

10

Reputation in der Community

  1. mücke

    Proxy.pac

    Ich habe gem. Beispiel von Wikipedia noch ein weiteres proxy.pac erstellt, das sieht so aus: function FindProxyForURL(url, host) { var proxy_yes_no = "PROXY xxx.xx.x.xx:8080; DIRECT"; var proxy_yes = "PROXY xxx.xx.x.xx:8080"; var proxy_no = "DIRECT"; if (url.substring(0, 5) != "http:") {return proxy_no;} if (url.substring(0, 6) != "https:") {return proxy_no;} if (url.substring(0, 4) != "ftp:") {return proxy_no;} if (shExpMatch(url,"localhost")) {return proxy_no;} if (shExpMatch(url, "172.*")) {return proxy_no;} if (shExpMatch(url, "*.sap.bdo.ch")) {return proxy_no;} if (shExpMatch(url, "*.local")) {return proxy_no;} if (shExpMatch(url, "192.168.200.*")) {return proxy_no;} if (shExpMatch(url, "aba*.bdo.ch")) {return proxy_no;} if (shExpMatch(url, "it*.bdo.ch")) {return proxy_no;} if (shExpMatch(url, "proxy.bdo.ch")) {return proxy_no;} if (shExpMatch(url, "proxy")) {return proxy_no;} if (isInNet(myIpAddress(), "xxx.xx.x.x", "255.255.254.0")) { return proxy_yes; } return proxy_yes_no; } aber auch das funktioniert nicht einwandfrei :( hat jemand ne Idee?
  2. mücke

    Proxy.pac

    Hallo zahni :) Vielen Dank für deine Antwort. Ich habe das return proxy_yes am Anfang herausgenommen, es funktioniert jedoch immernoch nicht alles :( Das Script sieht nun so aus: function FindProxyForURL(url, host) { var proxy_yes = "PROXY xxx.xx.x.xx:8080; DIRECT"; var proxy_no = "DIRECT"; if ((url.substring(0, 5) != "http:" || url.substring(0, 6) != "https:" || url.substring(0, 4) != "ftp:")) if (shExpMatch(url,"localhost") || shExpMatch(url, "172.*") || shExpMatch(url, "*.sap.bdo.ch") || shExpMatch(url, "*.local") || shExpMatch(url, "192.168.200.*") || shExpMatch(url, "aba*.bdo.ch") || shExpMatch(url, "it*.bdo.ch") || shExpMatch(url, "proxy.bdo.ch") || shExpMatch(url, "proxy")) return proxy_no; else return proxy_yes; else return proxy_yes; } Brauchts das "else" bei der if-funktion eigentlich nicht? Das Beispiel auf Wikipedia enthält nur if, ohne else. Hättest du noch eine Idee, an was es liegen könnte?
  3. mücke

    Proxy.pac

    Hallo zusammen Wir möchten in unserer Firma die Proxyeinstellungen über das proxy.pac File vornehmen. Nun, das funktioniert eigentlich ganz gut, bis auf die Tatasache dass einige lokale Seiten nicht angezeigt werden, jedoch komischerweise nicht alle :confused: Hier meine pac-Datei: function FindProxyForURL(url, host) { var proxy_yes = "PROXY 172.23.2.30:8080; DIRECT"; var proxy_no = "DIRECT"; if ((url.substring(0, 5) != "http:" || url.substring(0, 6) != "https:" || url.substring(0, 4) != "ftp:")) return proxy_yes if (shExpMatch(url,"localhost") || shExpMatch(url, "172.*") || shExpMatch(url, "*.sap.bdo.ch") || shExpMatch(url, "*.local") || shExpMatch(url, "192.168.200.*") || shExpMatch(url, "aba*.bdo.ch") || shExpMatch(url, "it*.bdo.ch") || shExpMatch(url, "proxy.bdo.ch") || shExpMatch(url, "proxy")) return proxy_no; else return proxy_yes; else return proxy_yes; } Hat jemand ne Ahnung was hier falsch läuft? Wäre über jede Antwort sehr dankbar :) Grüsse
×
×
  • Neu erstellen...