Re: [squid-users] How to reload a request via cache in squid if URL is blocked?

From: Eliezer Croitoru <eliezer_at_ngtech.co.il>
Date: Tue, 22 May 2012 17:16:29 +0300

On 22/05/2012 13:09, Mehdi Sadeqi wrote:
> Hi squid users!
>
> I have a simple and pretty basic squid3 configurations in my home
> server. I use it in combination with Tor and Privoxy. I have defined
> privoxy as cache_peer in squid configuration and an access list
> containing URLs this way:
>
>> acl censored dstdomain "/home/me/censored.acl"
>> never_direct allow censored
>> cache_peer localhost parent 8118 0 no-query no-digest name=privoxy
>> cache_peer_access privoxy allow censored
>
> Gradually I add new URLs to the "censored.acl" file to be loaded via
> proxy and it works. What I need is to make the process dynamic. For
> every request that goes to a blocked URL I have two lines of squid
> log:
>
>
>> 1337354630.541 716 127.0.0.1 TCP_MISS/403 521 GET http://bbc.co.uk/persian - DIRECT/212.58.241.131 -
>> 1337354630.614 24 127.0.0.1 TCP_HIT/000 0 GET http://10.10.34.34/? - DIRECT/10.10.34.34 -
>
>
> The second line is always the same. Is there anyway that I can reload
> a request in squid according the the response? Or if the request
> followed by or redirected to another URL? Because on censored URLs
> alwasy "TCP_MISS/403" happesn.
you can redirect in the http server from the blocked url to another url
or the source\referer url but beware of redirection loops.

Eliezer

-- 
Eliezer Croitoru
https://www1.ngtech.co.il
IT consulting for Nonprofit organizations
eliezer <at> ngtech.co.il
Received on Tue May 22 2012 - 14:16:42 MDT

This archive was generated by hypermail 2.2.0 : Tue May 22 2012 - 12:00:04 MDT