You rule Ben :)

2005/11/24, Ben Tanner <[EMAIL PROTECTED]>:
> 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: <[EMAIL PROTECTED]>
> Phone:  <2977>
>
>

Reply via email to