Proxy.pac

Aus Programmers Guide

(Unterschied zwischen Versionen)
Wechseln zu: Navigation, Suche
(Die Seite wurde neu angelegt: „function FindProxyForURL(url, host)<br>{<br> if( host.indexOf( "." ) == -1 )<br> {<br> return "DIRECT" ;<br> }<br> if ( shExpMatch(host, "192.168.0.*" ) <br> ||sh…“)
 
Zeile 1: Zeile 1:
-
function FindProxyForURL(url, host)<br>{<br> if( host.indexOf( "." ) == -1 )<br> {<br> return "DIRECT" ;<br> }<br> if ( shExpMatch(host, "192.168.0.*" ) <br> ||shExpMatch(host, "10.0.*" ) <br> ) <br> { return "DIRECT"; }<br> else<br> { return "PROXY 192.168.0.254:80"; }<br>}<br><br>
+
<source lang="javascript">
 +
function FindProxyForURL(url, host){
 +
if( host.indexOf( "." ) == -1 ){
 +
  return "DIRECT" ;
 +
}
 +
if( shExpMatch(host, "192.168.0.*" ) || shExpMatch(host, "10.0.*" )){
 +
  return "DIRECT";  
 +
}
 +
else{
 +
  return "PROXY 192.168.0.254:80"; }
 +
}
 +
</source>  
-
 
+
[[Category:Javascript]] [[Category:Proxy]]
-
 
+
-
[[Category:Javascript]][[Category:Proxy]]
+

Aktuelle Version vom 09:50, 30. Mär. 2010

function FindProxyForURL(url, host){
 if( host.indexOf( "." ) == -1 ){
  return "DIRECT" ;
 }
 if( shExpMatch(host, "192.168.0.*" ) || shExpMatch(host, "10.0.*" )){
  return "DIRECT"; 
 }
 else{
  return "PROXY 192.168.0.254:80"; }
 }
Persönliche Werkzeuge