There is any tool similar to this extensions Redirector that can be implemented at the local network level?
This extensions allows make rules with pattern type wildcard and regular expression that ‘cleanup’ a url.
Some url with tracker for example can be cleanup
This:
https://www.exampletracker.com/cread.php?awinmid=12047&awinaffid=269979&clickref=0e00l46bvw4s&p=http%3A%2F%2Fs.click.example.com%2Fdeep_link.htm%3Fdl_target_url%3Dhttps%3A%2F%2Faliexpress.com%2Fitem%2F33022616618.html%3F1%3D1%26aff_short_key%3Dr7AUf6A
To this:
https://example.com/item/33022616618.html
In this case I use regular expression
Include pattern:
^https?://(www\.)?exampletracker\.com(.*)(url=|url\%3D)(.+?)(\?1=1|%3F1%3D1)
Redirect to:
$4
AFAIK, such is practically impossible. On a client level, like a browser, of course it can work, as long as the client itself allows such request manipulation via plugin or settings or such. But you cannot tell another client to accept a redirect from anywhere else than the original remote server: A redirect is a 301 or 302 HTTP response code form the server the request was sent to. With HTTPS, clients only accept answers from the original remote server with the correct TLS certificate. Even if your router or any other instance would catch the client’s request and answer with a redirect, the client wouldn’t accept it as the certificate wouldn’t be accepted for the requested hostname. For this you would need to add the routers/firewalls false certificate to every client’s trusted certificate storage. DNSSEC would prevent also this attempt, and note that this breaks the DNS security concept fundamentally.
1 Like