[squid-users] squid url_rewrite_program how to return a kind of TCP reset

David Touzeau david at articatech.com
Mon Jan 31 00:20:49 UTC 2022


Hi

I have built my own squid url_rewrite_program

protocol requires answering with

# OK status=301|302 url=
Or
# OK rewrite-url="http://blablaba"

In my case, especially for trackers/ads i would like to say to browsers: 
"Go away !" without need them to redirect.

Sure i can use these methods but...

1) 127.0.0.1 - browser is in charge of getting out
----------------------------------------------------------------
OK status=302 url="http://127.0.0.1" But this ain't clean or polished.


2) 127.0.0.1 - Squid is in charge of getting out
----------------------------------------------------------------
OK rewrite-url="http://127.0.0.1" But this very very ain't clean or 
polished.
Squid claim in logs for an unreachable URL and pollute events


3) Redirect to a dummy page with a deny acl
----------------------------------------------------------------
OK status=302 url="http://dummy.com"
acl dummy dstdomain dummy.com
http_access deny dummy
deny_info TCP_RESET dummy

But it makes 2 connections to the squid for just stopping queries.
It seems not really optimized.

I notice that for several reasons i cannot switch to an external_acl

Is there a way / idea ?


Regards







-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squid-cache.org/pipermail/squid-users/attachments/20220131/e24beaf6/attachment.htm>


More information about the squid-users mailing list