Skip to content

Commit

Permalink
better proxy configuration in case of remote proxy
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@6016 6c8d7289-2bf4-0310-a012-ef5d649a1542
  • Loading branch information
lotus committed Jun 3, 2009
1 parent cc49aed commit efe97f4
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions htroot/autoconfig.pac
Expand Up @@ -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")
Expand All @@ -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";
}

0 comments on commit efe97f4

Please sign in to comment.