git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@6010 6c8d7289-2bf4-0310-a012-ef5d649a1542pull/1/head
parent
0d44a6d503
commit
61d9e131b4
@ -1,10 +1,18 @@
|
|||||||
function FindProxyForURL(url,host) {
|
function FindProxyForURL(url,host) {
|
||||||
if ((isPlainHostName(host))||
|
// http only
|
||||||
(host=="127.0.0.1")) {
|
if (!(url.substring(0, 5).toLowerCase() == "http:")) {
|
||||||
return "DIRECT";
|
|
||||||
} else if (url.substring(0, 4).toLowerCase() == "ftp:") {
|
|
||||||
return "DIRECT";
|
return "DIRECT";
|
||||||
} else {
|
}
|
||||||
return "PROXY #[host]#:#[port]#, DIRECT";
|
|
||||||
}
|
// no local adresses
|
||||||
|
ip = dnsResolve(host);
|
||||||
|
if ( isInNet(ip, "127.0.0.0", "255.0.0.0")
|
||||||
|
|| isInNet(ip, "192.168.0.0", "255.255.0.0")
|
||||||
|
|| isInNet(ip, "10.0.0.0", "255.0.0.0")
|
||||||
|
|| isInNet(ip, "172.16.0.0", "255.240.0.0") ) {
|
||||||
|
return "DIRECT";
|
||||||
|
}
|
||||||
|
|
||||||
|
// then
|
||||||
|
return "PROXY #[host]#:#[port]#, DIRECT";
|
||||||
}
|
}
|
Loading…
Reference in new issue