[squid-users] squid url_rewrite_program how to return a kind of TCP reset
NgTech LTD
ngtech1ltd at gmail.com
Mon Jan 31 04:27:34 UTC 2022
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 at articatech.com
>:
> 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" <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" <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" <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" <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 at lists.squid-cache.org
> http://lists.squid-cache.org/listinfo/squid-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squid-cache.org/pipermail/squid-users/attachments/20220131/5c7a6c41/attachment.htm>
More information about the squid-users
mailing list