Stoptrackingme - utility to remove tracking IDs from URLs
⚓ Rust 📅 2026-01-16 👤 surdeus 👁️ 4Like most people, I've grown tired of constantly having to take steps to prevent my privacy from slightly being eroded. One thing that has repeatedly bothered me is tracking IDs in URLs and having to manually remove them, which is why last night I made stoptrackingme: GitHub - landaire/stoptrackingme: Utility to remove tracking IDs from URLs
stoptrackingme is a command line utility which polls the system clipboard at some frequency (currently 500ms) and attempts to parse the text as a URL. If successful, it then runs the URL on some matcher rules that removes or replaces query params.
The rules are defined in TOML files which define a host and a matching strategy.
Examples
A Spotify URL may change from:
https://open.spotify.com/track/1DdIcvg2SZ3C8INMoEoHzR?si=adba9999xxx
To:
https://open.spotify.com/track/1DdIcvg2SZ3C8INMoEoHzR
It also supports path-based detection, which can be useful for detecting URLs such as Reddit's mobile share URLs:
https://www.reddit.com/r/rust/s/fakeShareIdaa333
These cannot be easily mapped to an "anonymous" share URL without actually making an HTTP request and getting the redirect target (which also includes a share_id).
This is a simple enough rule to implement:
hosts = ["*.reddit.com"]
[[param_matchers]]
name = "share_id"
[[path_matchers]]
name = "s"
operation = "request-redirect"
Service Management
The application has built-in service management so you can easily add it as a background service with stoptrackingme install-service and similar commands. It seems like there's maybe a bug with the stop-service command at the moment, but uninstall-service seems to force stop as well (at least on macOS). TODO to figure out.
Nuances
Logging
While I don't log to any files at this time, in release mode I've tried to prevent logging of any clipboard text by wrapping it in a ClipboardText type which redacts text when debug_assertions are not enabled.
Dependencies
This utility has a somewhat large dependency tree for a link cleaner. Most of these come from reqwest which I've shrank slightly by switching to nativetls, but at this time I'm not really doing any complex HTTP requests or response sniffing -- I'm doing HTTP HEAD requests and reading the Location header. I'm sure the dependencies here can be shrank and I'm open to any suggestions.
Data Bundling
In release mode all matchers are bundled with the executable. See the note below.
AI Disclosure
I used claude for:
- Generating test cases (which actually found a bug so that was cool)
- Generating the
flake.nix. I'm a nix user, but honestly I have no idea what I'm doing. - Generating the initial
build.rsfor embedding data. tl;dr this deserializes the TOML files and spits out an array ofMatchers as literal Rust code. I was too lazy manually write the string joining operations for this.
3 posts - 2 participants
🏷️ Rust_feed