Skip to content

c127dev/privacy-tools

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Privacy Toolkit

A shield against tracking, it's my privacy and it's my right to have it respected

Badge License Badge Cloudflare Worker Badge Tampermonkey Badge Issues

📖 Overview

This project combats pervasive link tracking across services. It combines:

  1. Cloudflare Worker: Resolves redirects (302/301) and scrubs tracking parameters without exposing your IP.
  2. Tampermonkey Script: Automatically de-tracks URLs in Services Online in real time.

✨ Features

  • 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.

🛠 How It Works

🔗 Cloudflare Worker

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);  
}

🐒 Tampermonkey Script

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 });  

🚀 Setup

1. Deploy Cloudflare Worker

  • Requirements: Cloudflare account, Node.js, Wrangler CLI.
  • Steps:
git clone https://github.com/c127dev/privacy-tools.git  
cd privacy-tools/worker  
wrangler deploy  

2. Install Tampermonkey Script

  • Requirements: Tampermonkey extension (Chrome, Firefox).
  • Steps:
    • Download Script untracker.js.
    • Open Tampermonkey Dashboard > + New Script.
    • Configure constants like CLOUDFLARE_WORKER_URL

⚙️ Configuration

Environment Variables (Worker)

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

💻 Usage

Test via cURL

curl "https://url-resolver.c127.dev/?url=https://l.messenger.com/l.php?u=https://example.com"  

Response:

{ "cleaned_url": "https://example.com" }  

Links untrack

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

🤝 Contributing

  1. Fork the repository.
  2. Submit PRs to:
    • Add support for Instagram/Twitter/Google/Amazon tracking.
    • Improve header spoofing in the Worker.
  3. Report bugs via Issues.

📜 License

MIT License. See LICENSE.

🙌 Acknowledgments

  • Cloudflare Workers for serverless edge computing.
  • Tampermonkey for enabling client-side privacy hacks.

About

A shield against tracking, it's my privacy and it's my right to have it respected

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published