Re: [squid-users] limiting connections

From: Carlos Manuel Trepeu Pupo <charlie.mtp_at_gmail.com>
Date: Mon, 2 Apr 2012 10:21:34 -0400

Thanks a looooooottttt !! That's what I'm missing, everything work
fine now. So this script can use it cause it's already works.

Now, I need to know if there is any way to consult the active request
in squid that work faster that squidclient !!!!

On Sat, Mar 31, 2012 at 9:58 PM, Amos Jeffries <squid3_at_treenet.co.nz> wrote:
> On 1/04/2012 7:58 a.m., Carlos Manuel Trepeu Pupo wrote:
>>
>> On Sat, Mar 31, 2012 at 4:18 AM, Amos Jeffries<squid3_at_treenet.co.nz>
>> �wrote:
>>>
>>> On 31/03/2012 3:07 a.m., Carlos Manuel Trepeu Pupo wrote:
>>>>
>>>>
>>>> Now I have the following question:
>>>> The possible error to return are 'OK' or 'ERR', if I assume like
>>>> Boolean answer, "OK"->TRUE& � �"ERR"->FALSE. Is this right ?
>>>
>>>
>>> Equivalent, yes. Specifically it means success / failure or match /
>>> non-match on the ACL.
>>>
>>>
>>>> So, if I deny my acl:
>>>> http_access deny external_helper_acl
>>>>
>>>> work like this (with the http_access below):
>>>> If return "OK" -> � �I denied
>>>> If return "ERR" -> � �I do not denied
>>>>
>>>> It's right this ??? Tanks again for the help !!!
>>>
>>>
>>> Correct.
>>
>> OK, following the idea of this thread that's what I have:
>>
>> #!/bin/bash
>> while read line; do
>> � � � � # -> �This it for debug (Testing i saw that not always save to
>> file, maybe not always pass from this ACL)
>> � � � � echo $line>> �/home/carlos/guarda&
>>
>> � � � � result=`squidclient -h 10.11.10.18 mgr:active_requests | grep
>> -c "$line"`
>>
>> � if [ $result == 1 ]
>> � � � � then
>> � � � � echo 'OK'
>> � � � � echo 'OK'>>/home/carlos/guarda&
>> � else
>> � � � � echo 'ERR'
>> � � � � echo 'ERR'>>/home/carlos/guarda&
>> � fi
>> done
>>
>> In the squid.conf this is the configuration:
>>
>> acl test src 10.11.10.12/32
>> acl test src 10.11.10.11/32
>>
>> acl extensions url_regex "/etc/squid3/extensions"
>> # extensions contains:
>>
>> \.(iso|avi|wav|mp3|mp4|mpeg|swf|flv|mpg|wma|ogg|wmv|asx|asf|deb|rpm|exe|zip|tar|tgz|rar|ppt|doc|tiff|pdf)$
>> external_acl_type one_conn %URI /home/carlos/contain
>> acl limit external one_conn
>>
>> http_access allow localhost
>> http_access deny extensions !limit
>> deny_info ERR_LIMIT limit
>> http_access allow test
>>
>>
>> I start to download from:
>> 10.11.10.12 ->
>> �http://ch.releases.ubuntu.com//oneiric/ubuntu-11.10-desktop-i386.iso
>> then start from:
>> 10.11.10.11 ->
>> �http://ch.releases.ubuntu.com//oneiric/ubuntu-11.10-desktop-i386.iso
>>
>> And let me download. What I'm missing ???
>
>
> You must set "ttl=0 negative_ttl=0 grace=0" as options for your
> external_acl_type directive. To disable caching optimizations on the helper
> results.
>
> Amos
Received on Mon Apr 02 2012 - 14:21:42 MDT

This archive was generated by hypermail 2.2.0 : Tue Apr 03 2012 - 12:00:02 MDT