function FindProxyForURL(url, host) {
var proxy = "PROXY 10.11.12.1:3128; DIRECT";
var direct = "DIRECT";
var localDomain = '*.seminarnet';
// no proxy for local hosts without domain:
if(isPlainHostName(host)) return direct;
//We only cache http
if (
url.substring(0, 4) == "ftp:" ||
url.substring(0, 6) == "rsync:"
)
return direct;
// If the requested website is hosted within the internal network,
// send direct.
if (isPlainHostName(host) ||
shExpMatch(host, localDomain) ||
isInNet(dnsResolve(host), "10.11.12.0", "255.255.255.0") ||
isInNet(dnsResolve(host), "127.0.0.0", "255.0.0.0"))
return direct;
// proxy everything else:
return proxy;
}