Proxy.pac
Aus Programmers Guide
(Unterschied zwischen Versionen)
Roy (Diskussion | Beiträge) (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…“) |
Roy (Diskussion | Beiträge) |
||
Zeile 1: | Zeile 1: | ||
- | function FindProxyForURL(url, host) | + | <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"; } }