#privacy #url-cleaner #url #url-tracking

bin+lib url-cleaner-site

A basic HTTP server and userscript to make using URL Cleaner in a browser easier

2 unstable releases

Uses new Rust 2024

new 0.9.0 Apr 24, 2025
0.6.2 Nov 25, 2024

#43 in #privacy

AGPL-3.0-or-later

45KB
596 lines

URL Cleaner Site

A simple HTTP server to allow using URL Cleaner, in web browser userscripts and other applications where SSH tunnels are infeasable.

/!\ PLEASE SEE URL Cleaner's DOCS FOR KNWON PRIVACY CONCERNS. /!'

URL Cleaner and URL Cleaner Site are under very active development and there are many non-obvious privacy concerns that may or may not be important to you.

TLS/HTTPS

TLS/HTTPS can be used with the --key and --cert arguments.
Minica makes it easy to have stuff shut up about self signed certificates.
For FireFox, where this is unreasonably difficult, simply opening https://localhost:9149, clicking "Advanced", then "Accept the Risk and Continue" seems to work.

Please note that this requires changing window.URL_CLEANER_SITE = "http://localhost:9149"; in the userscript to https.

Currently the default port of 9149 applies to both HTTP and HTTPS servers.

Performance

Due to the overhead of using HTTP, getting all the jobs before running them, and optionally TLS, performance is significantly worse than the CLI.

On the same laptop used in URL Cleaner's example benchmarks and with TLS, hyperfine (using CURL) gave me the following benchmarks:

Without TLS, the benchmarks are about 15ms faster, but the worst case scenario is provided because it's more useful.

Last updated 2025-04-23.

{
  "https://x.com?a=2": {
    "0"    :  26.413,
    "1"    :  28.502,
    "10"   :  26.480,
    "100"  :  26.371,
    "1000" :  30.198,
    "10000":  61.400
  },
  "https://example.com?fb_action_ids&mc_eid&ml_subscriber_hash&oft_ck&s_cid&unicorn_click_id": {
    "0"    :  26.247,
    "1"    :  26.339,
    "10"   :  26.288,
    "100"  :  26.655,
    "1000" :  32.473,
    "10000":  80.217
  },
  "https://www.amazon.ca/UGREEN-Charger-Compact-Adapter-MacBook/dp/B0C6DX66TN/ref=sr_1_5?crid=2CNEQ7A6QR5NM&keywords=ugreen&qid=1704364659&sprefix=ugreen%2Caps%2C139&sr=8-5&ufe=app_do%3Aamzn1.fos.b06bdbbe-20fd-4ebc-88cf-fa04f1ca0da8": {
    "0"    :  26.475,
    "1"    :  26.390,
    "10"   :  26.175,
    "100"  :  27.682,
    "1000" :  36.432,
    "10000": 113.727
  }
}

If you're using FireFox, you should know that Greasemonkey gives me much better performance of the userscript than Tampermonkey.

As for the performance of the userscript itself... I honestly can't say. Nothing strikes me as particularly bad in terms of either CPU or memory usage, but I haven't seriously used javascript in years.
It probably has a very slow memory leak that would be a problem when on a long-running webpage session having billions of elements, but that's very unlikely to ever happen outside testing.

Dependencies

~31–68MB
~1.5M SLoC