Re: .pac auto-config files

From: Chris Dillon <cdillon@dont-contact.us>
Date: Wed, 15 Mar 2000 14:51:58 -0600 (CST)

On Wed, 15 Mar 2000, Carpenter, Dean wrote:

> I have a fairly neat proxy.pac file set up to direct traffic between our two
> caches and certain sites to be direct, and it works well.
>
> Now I need to force a couple of subnets to go direct no matter what. Is
> there any way to pull the local/client ip address in the FindProxyForURL
> function in the .pac file ? With that it would just return "DIRECT" for all
> urls being requested from those particular subnets.

        if (!isInNet(myIpAddress(), "192.168.1.0", "255.255.255.0")
                && !isInNet(myIpAddress(), "192.168.2.0", "255.255.255.0")
                )
                return "DIRECT";

This will cause any machine that does NOT reside within
192.168.1.0/255.255.255.0 or 192.168.2.0/255.255.255.0 to always go
direct (great for roaming users when they aren't on their home
network). Adjust to suit your needs. :-)

-- Chris Dillon - cdillon@wolves.k12.mo.us - cdillon@inter-linc.net
   FreeBSD: The fastest and most stable server OS on the planet.
   For Intel x86 and Alpha architectures. ( http://www.freebsd.org )
Received on Wed Mar 15 2000 - 13:55:19 MST

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:52:15 MST