A shield against tracking, it's my privacy and it's my right to have it respected
This project combats pervasive link tracking across services. It combines:
- Cloudflare Worker: Resolves redirects (302/301) and scrubs tracking parameters without exposing your IP.
- Tampermonkey Script: Automatically de-tracks URLs in Services Online in real time.
- IP Masking: Redirects via Cloudflare to prevent Services from logging your IP.
- Parameter Scrubbing: Removes
fbclid
,rdid
,share_url
, and other trackers. - Real-Time DOM Cleaning: Blocks from re-adding tracking URLs after page updates.
- Open Source: Self-hostable, customizable, and transparent.
Intercepts requests to tracking URLs, resolves redirects, and returns clean URLs:
// Simple Example Worker Logic
async function handleRequest(request) {
const url = getUrlParam(request);
const response = await fetch(url, { headers: fakeBrowserHeaders });
const finalUrl = cleanUrl(response.headers.get('location'));
return new Response(finalUrl);
}
Runs on Multiple Services (Meta Services), detecting and rewriting tracking links:
// DOM Mutation Observer
new MutationObserver(() => {
document.querySelectorAll('a[href*="l.messenger.com"]').forEach(link => {
link.href = decodeTrackingUrl(link.href);
});
}).observe(document.body, { childList: true });
- Requirements: Cloudflare account, Node.js, Wrangler CLI.
- Steps:
git clone https://github.com/c127dev/privacy-tools.git
cd privacy-tools/worker
wrangler deploy
- Requirements: Tampermonkey extension (Chrome, Firefox).
- Steps:
- Download Script untracker.js.
- Open Tampermonkey Dashboard > + New Script.
- Configure constants like
CLOUDFLARE_WORKER_URL
Variable | Description | Example Value |
---|---|---|
FACEBOOK_UA |
User-Agent to mimic browsers | `Mozilla/5.0 (Windows NT 10.0; Win64```` |
ALLOWED_DOMAINS |
Restrict to specific domains | messenger.com,facebook.com |
curl "https://url-resolver.c127.dev/?url=https://l.messenger.com/l.php?u=https://example.com"
Response:
{ "cleaned_url": "https://example.com" }
Just browse normally. The script auto-detects and cleans URLs:
- Before:
https://l.messenger.com/l.php?u=https%3A%2F%2Fexample.com&h=ABC123
- After:
https://url-resolver.c127.dev?redirect=1&url=https://l.messenger.com/l.php?u=https%3A%2F%2Fexample.com&h=ABC123
- Fork the repository.
- Submit PRs to:
- Add support for Instagram/Twitter/Google/Amazon tracking.
- Improve header spoofing in the Worker.
- Report bugs via Issues.
MIT License. See LICENSE.
- Cloudflare Workers for serverless edge computing.
- Tampermonkey for enabling client-side privacy hacks.