Search squid archive

Re: limiting connections

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxx> 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@xxxxxxxxxxxxx>
>>  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



[Index of Archives]     [Linux Audio Users]     [Samba]     [Big List of Linux Books]     [Linux USB]     [Yosemite News]

  Powered by Linux