My mistake was misunderstanding
isInNet.
I thought it was
isInNet( host, ipstart, ipend ) where your
ipstart <= host <= ipend, but it is really
isInNet( host, IP, MASK ). They IP & MASK and see
whether your IP address matches that network.
------------------------------
Message: 14
Date: Wed, 19 Sep 2007 11:55:30 +0930
From: Tim <ignored_mailbox@xxxxxxxxxxxx>
Subject: Re: proxy autoconfig
To: For users of Fedora <fedora-list@xxxxxxxxxx>
Message-ID: <1190168730.2697.6.camel@xxxxxxxxxxxxxxxxxxxxx>
Content-Type: text/plain
tony.chamberlain@xxxxxxxxx:
> function FindProxyForURL(url, host) {
>
> if (isInNet(host, "10.0.0.0", "10.255.255.255")) {
> return "PROXY 192.168.5.15:8001";
> }
>
> // All other requests are direct
> return "DIRECT";
> }
I think you're missing an "else" in the line before "// All".
Mine's like the following, although I'm doing the opposite of you
(bypassing the proxy for local IP addresses, and using the proxy for
anything I've not specifically listed).
--- begin below ---
function FindProxyForURL(url, host)
{
if (isPlainHostName(host) ||
dnsDomainIs(host, ".localdomain") ||
dnsDomainIs(host, ".google.com.au") ||
dnsDomainIs(host, ".hotmail.com") ||
dnsDomainIs(host, ".passport.com") ||
isInNet (host, "127.0.0.0", "255.255.255.0") ||
isInNet (host, "192.168.0.0", "255.255.0.0"))
return "DIRECT";
else
return "PROXY proxy.localdomain:3128; DIRECT";
}
--- finished above ---
Just for clarity's sake: "localdomain" is a local domain on my DNS
server, it's not a keyword with a special meaning.
--
[tim@bigblack ~]$ uname -ipr
2.6.22.4-65.fc7 i686 i386
****************************