mirror of
https://github.com/yacy/yacy_search_server.git
synced 2024-09-19 00:01:41 +02:00
better proxy configuration in case of remote proxy
git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@6016 6c8d7289-2bf4-0310-a012-ef5d649a1542
This commit is contained in:
parent
cc49aedf12
commit
efe97f446a
|
@ -4,6 +4,9 @@ function FindProxyForURL(url,host) {
|
|||
return "DIRECT";
|
||||
}
|
||||
|
||||
// not the proxy itself
|
||||
if (host == "#[host]#") return "DIRECT";
|
||||
|
||||
// no local adresses
|
||||
ip = dnsResolve(host);
|
||||
if ( isInNet(ip, "127.0.0.0", "255.0.0.0")
|
||||
|
@ -13,6 +16,9 @@ function FindProxyForURL(url,host) {
|
|||
return "DIRECT";
|
||||
}
|
||||
|
||||
// not the proxy itself (better: dnsResolve(#[host]#), but an additional lookup)
|
||||
if (ip == "#[host]#") return "DIRECT";
|
||||
|
||||
// then
|
||||
return "PROXY #[host]#:#[port]#, DIRECT";
|
||||
}
|
Loading…
Reference in New Issue
Block a user