Search squid archive

RE: autoconfig pac file

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

 



Hi there Toto,

I think you want to do something like this:

function FindProxyForURL(url, host)
{
         if (isPlainHostName(host) ||
			isInNet(myIpAddress(), "10.2.0.0", "255.255.0.0"))
                 return "PROXY 10.1.1.13:3128";
         else
                 return "DIRECT";
}


Otherwise what you're doing is a DNS lookup against the host the client is attempting to fetch, and then checking to see if that destination is in the relevant subnet. This code will check that you're not attempting to access a local page (removes load off your proxy) and then check to see if the client IP is in the specified IP range.

Hope that helps,

Ben
--
Ben Tanner
Senior Computing Officer
Network Support Unit
E-Mail:	<b.tanner@xxxxxxxxxxxxxxxx>
Phone:	<2977>



[Index of Archives]     [Linux Audio Users]     [Samba]     [Big List of Linux Books]     [Linux USB]     [Yosemite News]

  Powered by Linux