code.fastix.org

Dateiansicht:

Datei:Projekte -> Linux:Netzwerk für Seminare -> Router_Server -> var -> www -> seminar -> htdocs -> wpad.dat
md5:4ae4381312720b80a76f12ef3af865a0
sha1:a6d971133e89ec3f6ca887ca168ba69a56747782
Download-Link:Download
  1. function FindProxyForURL(url, host) {
  2.     var proxy = "PROXY 10.11.12.1:3128; DIRECT";
  3.     var direct = "DIRECT";
  4.     var localDomain = '*.seminarnet';
  5.  
  6.     // no proxy for local hosts without domain:
  7.     if(isPlainHostName(host)) return direct;
  8.  
  9.     //We only cache http
  10.      if (
  11.          url.substring(0, 4) == "ftp:" ||
  12.          url.substring(0, 6) == "rsync:"
  13.         )
  14.     return direct;
  15.  
  16.  
  17.  
  18.  
  19.  
  20.     // If the requested website is hosted within the internal network,
  21.     //  send direct.
  22.     if (isPlainHostName(host) ||
  23.         shExpMatch(host, localDomain) ||
  24.         isInNet(dnsResolve(host), "10.11.12.0", "255.255.255.0") ||
  25.         isInNet(dnsResolve(host), "127.0.0.0",  "255.0.0.0"))
  26.         return direct;
  27.  
  28.     // proxy everything else:
  29.     return proxy;
  30. }
  31.  
  32.