Re: [squid-users] configuring squid to go directly in case of upstream proxies are down

From: nipun_mlist Assam <nipunmlist_at_gmail.com>
Date: Wed, 30 May 2012 15:29:55 +0530

Thanks Amos and Eliezer for the hints.

I could achieve my requirements by having some rules as below:

never_direct deny aclforclient_c1 #Here we allow direct access of
internet from squid if parent is down
never_direct allow aclforclient_c2 #Here squid drops the connection if
parent is down
never_direct allow all
always_direct deny all

Is there any way to make the "never_direct" rules aware of the parent
proxies (i.e. making parent proxy specific never_direct rules).

On Tue, May 29, 2012 at 6:13 PM, Eliezer Croitoru <eliezer_at_ngtech.co.il> wrote:
> On 29/05/2012 14:07, Amos Jeffries wrote:
>>
>> On 29/05/2012 10:13 p.m., nipun_mlist Assam wrote:
>>>
>>> Is there any way through which I can control traffic from only few
>>> clients to connect directly to internet if the upstream parent proxies
>>> are down.
>>> For example, in an example configuration squid forwards traffic from
>>> client C1 and C2 to parent proxy P.
>>>
>>> HTTP traffic from client C1 and C2<---> forwarding squid<---> P<--->
>>> cloud
>>>
>>> If parent P is down I want C1's traffic to be sent directly to the
>>> internet by squid, while for C2 the connection should be dropped by
>>> squid.
>>>
>>> "prefer_direct off" affects traffics from all the clients.
>>> Is there any way to use a combination of "prefer_direct off" and
>>> "never_direct allow all/ always_direct deny all" ?
>>
>>
>> never_direct and allow_direct are lists with multiple lines performing
>> if-else logic just like http_access.
>>
>> Think about it like this: you said you want these clients to go direct
>> *sometimes*, so why are you setting them to *never* go direct? ("all"
>> matches everything).
>>
>> prefer_direct determins whether the parent or DIRECT are *tried* first.
>> First route to succeed suplies the answer.
>>
>> Amos
>
> i can think of a never direct and always direct and using an external helper
> that will determine if the client will match the category of never_direct or
> always_direct.
>
> Eliezer
>
> --
> Eliezer Croitoru
> https://www1.ngtech.co.il
> IT consulting for Nonprofit organizations
> eliezer <at> ngtech.co.il

-- 
Regards,
Nipun
Received on Wed May 30 2012 - 10:00:02 MDT

This archive was generated by hypermail 2.2.0 : Wed May 30 2012 - 12:00:06 MDT