RE: [squid-users] Re: proxy.pac 'and' statement

From: Jason Staudenmayer <jasons@dont-contact.us>
Date: Thu, 14 Dec 2006 09:02:26 -0500

Try it this way

 if (shExpMatch(url, "https://*.xyz.com") && (myIpAddress()==
"10.1.4.4")){
 
    return "DIRECT";
 
  }

Looks like you closed your "if" before your "and", not sure but you
might not need the "(" before myIp.
If those functions need to be enclosed then try it like this.

 if ((shExpMatch(url, "https://*.xyz.com")) && (myIpAddress() ==
"10.1.4.4")){
 
    return "DIRECT";
 
  }

Jason

> -----Original Message-----
> From: John Halfpenny [mailto:jhalfpenny@excite.com]
> Sent: Thursday, December 14, 2006 8:52 AM
> To: squid-users@squid-cache.org
> Cc: ding.deng@gmail.com
> Subject: [squid-users] Re: proxy.pac 'and' statement
>
>
>
> Well spotted. Ok, I put the quotes back in (!) but it still
> won't work. What I want to do is IF this AND this THEN that
>
>
>
> But i can't find anything which notes how to do it!
>
>
>
> We now have-
>
>
>
> if (shExpMatch(url, "https://*.xyz.com")) && (myIpAddress()
> == "10.1.4.4"){
>
> return "DIRECT";
>
> }
>
>
>
> Anyone have any experience in this?
>
>
>
> John
>
>
>
>
>
> --- On Thu 12/14, Ding Deng < ding.deng@gmail.com > wrote:
>
> From: Ding Deng [mailto: ding.deng@gmail.com]
>
> To: jhalfpenny@excite.com
>
> Date: Thu, 14 Dec 2006 20:52:23 +0800
>
> Subject: Re: proxy.pac 'and' statement
>
>
>
> "John Halfpenny" <jhalfpenny@excite.com> writes:> Hi All.>>
> For certain reasons I would like a specific machine to go
> direct around squid to site xyz.com, this doesn't seem to
> work in the proxy.pac- any idea why?>> if (shExpMatch(url,
> "https://*.xyz.com)) && (myIpAddress() == "10.1.4.4"){Try
> shExpMatch(url, "https://*.xyz.com/*")orshExpMatch(host,
> "*.xyz.com")> return "DIRECT";>> }>> TIA>> John>>
> _______________________________________________> Join Excite!
> - http://www.excite.com> The most personalized portal on the Web!
>
> _______________________________________________
> Join Excite! - http://www.excite.com
> The most personalized portal on the Web!
>
>
>
Received on Thu Dec 14 2006 - 07:02:36 MST

This archive was generated by hypermail pre-2.1.9 : Mon Jan 01 2007 - 12:00:01 MST