proxy autoconfig

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

****************************
-- 
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux