Skip to content

Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance

better proxy configuration in case of remote proxy

lotusefe97f446a82
diff --git a/htroot/autoconfig.pac b/htroot/autoconfig.pac
index 5ed509536..435e4587c 100644
--- a/htroot/autoconfig.pac
+++ b/htroot/autoconfig.pac
@@ -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";
}
\ No newline at end of file