package or way to modify links
-
hi folks,
is there a way known or a package, to auto modify links according to rules?
e.g.
https://mydealz.digidip.net/visit?url=https%3A%2F%2Fwww.saturn.de%2Fde%2Fproduct%2F_xiaomi-redmi-9a-2667686.html&ppref=https%3A%2F%2Fwww.mydealz.de%2Fdeals%2Fxiaomi-redmi-9a-32gb-dual-sim-3-farben-fur-je-7890eur-inkl-versandkosten-1693872&ref=1148037647that link includes all reference stuff that i dont want.
just want to get:
https://www.saturn.de/de/product/_xiaomi-redmi-9a-2667686.html -
Squidguard has a url re-write feature you might be able to use with some careful regex. It's unlikely to work well across numerous pages though.
Why not just use the link directly?
Steve
-
hi Steve, thanks for your post.
i am aware that some kind of rule needs to be written for every single page, but that would be fine.
Would like to have it automatized because digidip is a huge data octopus and manually changing the URL is annoying. The URL is unfortunately never directly visible. so you need to inspect within your browser.
Will check on squidguard!
-
Ok going to show you a addon you might be interested in ;)
https://addons.mozilla.org/en-US/firefox/addon/clearurls/
This is not something you would do on pfsense, this is something you would do in you browser..
So take your link there
Now I paste that url - and get exactly what your after..
https://gitlab.com/KevinRoebert/ClearUrls
ClearURLs is an add-on based on the new WebExtensions technology and will automatically remove tracking elements from URLs to help protect your privacy when browse through the Internet.it works in the background - you shouldn't have to copy and paste, that is just feature you can use with it.. Which I did to show you how it works..
-
@johnpoz
thanks for presenting the addon, will check it.just for my education, why do I dont want to have this integrated into pfsense?
-
Because you would have to proxy all your connections through it.. How do you think that would work when everything is inside a https tunnels these days?
How would pfsense even see the urls on the website?
Https is laymans terms a vpn between your browser and the webserver.. You have an encrypted tunnel between the browser and the server.. Your router can not see whats inside this tunnel.
For something like this to work, you would need to proxy all your connections and do mitm on all https traffic.. Why you do it in your browser..
What your asking is for every https connection to be proxied, and for the proxy to rewrite the destination as well.. Makes no sense to do.. When you proxy a https connection you send a connect.. So your proxy would have to rewrite that connect, and figure out where you want to go, and send you there - but that is not where your browser thought you were going.. So its going to scream bloody murder at that for sure..
-
Not really sure what digidip is or why you would want to go there. I tried to visit it though and find it's blocked as advertising so that tells me all I need to know.
But, yeah, a browser extension seems like a much better way to go here.
Steve
-
I think the idea is he doesn't want to go there ;)
He just wants to go to the site, vs routing it through that site... Something like this is done on the browser.. Before you ever go anywhere.
If I try and proxy that with proxy stripping out the shit and going to where you want to go..
https://shitsite.com/blahblah-https://realsite.tld
You send connect to your proxy saying you want to go to shitsite.com, but it really goes to realsite.tld and tries to send that back you browser is going to say wtf is this.. That is not shitsite.com..
You do it at the browser level, so browser goes to realsite.tld
Keep in mind - with links your going to click on, the addon might not change those... Which is why you use the copy and paste clean option on something you want to click on..
I was not all that worried about tracking stuff via browser called stuff in the site.. But wanted a simple way to clean up shit links before I sent them to friends, etc. Or posted them on forums without having to do it manually..
But what the addon on does in the background is removing tracking stuff in say scripts and other stuff called by a website your loading..
you can turn on local logging to see what its doing in the background.. But for stuff like an email your reading with some shit link like you posted, and you want to just go to where it ends up without routing you through some tracking that you clicked their link - the copy paste is the best option. Or the addon has a little tool you can load to copy paste stuff..