Listing 2 - Browser autoconfig file
/* Proxy autoconfig file for Netscape Navigator */
function FindProxyForURL(url, host)
{
// Direct connections to non-FQDN hosts
if (isPlainHostName(host)) {
return "DIRECT";
}
// Direct connections within the local domain
if (dnsDomainIs(host, ".my.domain") ||
localHostOrDomainIs(host, "localhost")) {
return "DIRECT";
}
// Direct connections to local subnets
if (isInNet(host, "127.0.0.0", "255.255.255.0")) {
return "DIRECT";
}
// Otherwise use proxy
return "PROXY proxy1.my.domain:3128";
}