RE: [squid-users] proxy.pac

From: Jorge Cuellar Martinez <jorge.cuellar@dont-contact.us>
Date: Thu, 18 Oct 2001 13:16:32 -0500

Thanks i have finished and i done it this way:

function FindProxyForURL(url, host)
    {
        if (isPlainHostName(host) ||
            dnsDomainIs(host, ".sat.gob.mx") ||
            dnsDomainIs(host, ".aduanas.gob.mx") ||
            dnsDomainIs(host, ".isosa.com.mx") ||
            isInNet (host, "99.0.0.0","255.0.0.0") ||
            isInNet (host, "101.0.0.0","255.0.0.0") ||
            isInNet (host, "223.53.0.0.0","255.0.0.0"))
            return "DIRECT";
        else if (shExpMatch(myIpAddress(), "99.*") ||
                shExpMatch(myIpAddress(), "101.*"))
            return "PROXY proxy:3128; PROXY proxy1:3128";
        else
            return "PROXY proxy1:3128; PROXY proxy:3128";
    }

some extrange reason didn't let me do it backwards:

function FindProxyForURL(url, host)
    {
        if (isPlainHostName(host) ||
            dnsDomainIs(host, ".sat.gob.mx") ||
            dnsDomainIs(host, ".aduanas.gob.mx") ||
            dnsDomainIs(host, ".isosa.com.mx") ||
            isInNet (host, "99.0.0.0","255.0.0.0") ||
            isInNet (host, "101.0.0.0","255.0.0.0") ||
            isInNet (host, "223.53.0.0.0","255.0.0.0"))
            return "DIRECT";
        else if (shExpMatch(myIpAddress(), "223.53.*"))
            return "PROXY proxy.sat.gob.mx:3128; PROXY
proxy1.sat.gob.mx:3128";
        else
            return "PROXY proxy1.sat.gob.mx:3128; PROXY
proxy.sat.gob.mx:3128";
    }

it just didn't work... i tried in some of my other subnets (i tried 5
diferent subnets with 99.X.X.X) and all they did work, exept for 223.53.X.X
 
example:
        else if (shExpMatch(myIpAddress(), "99.90.*")) worked great
        else if (shExpMatch(myIpAddress(), "223.53.*")) didn't work!

it's weird but i could only finish it by expressing it backwards...

-----Original Message-----
From: e [mailto:lij@agric.nsw.gov.au]
Sent: Wednesday, October 17, 2001 6:31 PM
To: Tommy Lindqvist
Cc: squid-users@squid-cache.org
Subject: Re: [squid-users] proxy.pac

Hi Tommy,

Try this:
function FindProxyForURL(url, host)
{
        // Force proxy for www host and www.space.se
        if( host=="www" || host=="www.space.se" )
        return "PROXY wwwgate:3128";
              
        // Proxy direct connections to your local hosts
        if ( isPlainHostName(host) ||
             dnsDomainIs(host, ".space.se") ||
             isInNet(host, "195.100.0.0", "255.255.0.0") )
           return "DIRECT";

        // any thing else should go through Proxy
        return "PROXY wwwgate:3128";
              
}

Jihong LI
Systems Administrator
Information Technology
NSW Agriculture

Tel 02 6391 3271
Fax 02 6391 3290
On Wed, 17 Oct 2001, Tommy Lindqvist wrote:

> Hi,
>
> Internet explorer is a funny beast when it comes to using proxy.pac
> in order to try to direct it.
>
> I have a similar problem, in which I have an open case with M$.
> ( I want Internet explorer to use a proxy for external access,
> and no proxy for internal access. )
>
> The background, and tests I did is in the attached ( small ) textfile.
>
> Hope this can help.
>
> Tommy
>
>
>
Received on Thu Oct 18 2001 - 12:15:33 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 17:02:51 MST