Search squid archive

Re: squid url_rewrite_program how to return a kind of TCP reset

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

 



You can try to use deny_info with a customized error page template or an icap service that will respond with a different page.
I think that redirecting to an external website is a good choice.
Many commercial products use this technique.
If you want the traffic of this website to be bypassed from squid you can also do that with couple iptables lines.

All The Bests,
Eliezer

בתאריך יום ב׳, 31 בינו׳ 2022, 2:21, מאת David Touzeau ‏<david@xxxxxxxxxxxxxx>:
Hi

I have built my own squid url_rewrite_program

protocol requires answering with

# OK status=301|302 url=""> Or
# OK rewrite-url="" href="http://blablaba" target="_blank" rel="noreferrer">"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="" href="http://127.0.0.1" target="_blank" rel="noreferrer">"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="" href="http://127.0.0.1" target="_blank" rel="noreferrer">"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="" href="http://dummy.com" target="_blank" rel="noreferrer">"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








_______________________________________________
squid-users mailing list
squid-users@xxxxxxxxxxxxxxxxxxxxx
http://lists.squid-cache.org/listinfo/squid-users
_______________________________________________
squid-users mailing list
squid-users@xxxxxxxxxxxxxxxxxxxxx
http://lists.squid-cache.org/listinfo/squid-users

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

  Powered by Linux