How I Made a Transparent Tor Proxy with Dead Man’s Switch

🧅 What is TorForge?

I just released TorForge, an advanced transparent Tor proxy that routes ALL your system traffic through Tor with a single command. No browser extensions, no app configuration – everything just works.

Why I Built This

Existing solutions had problems:

  • Tor Browser: Only protects one browser
  • Torsocks: Per-application, easy to forget
  • Whonix: Requires VM overhead

TorForge operates at the kernel level using iptables, capturing everything.

🔥 Key Features

Core Functionality

Feature Description
Transparent Proxy Routes all TCP/DNS through Tor automatically
Kill Switch Default DROP policy – no leaks possible
IPv6 Blocking Complete leak protection
Auto-Rotation Change exit IP every N minutes
Multi-Circuit 8+ concurrent circuits for speed

Advanced Security

Feature Description
Post-Quantum Encryption CRYSTALS-Kyber768 (NIST Level 3)
Steganography Mode Traffic looks like Netflix/YouTube streaming
Decoy Traffic Injects fake requests to frustrate analysis
Dead Man’s Switch Panic key for instant emergency shutdown

AI-Powered

Feature Description
Smart Circuit Selection AI learns optimal exit nodes based on performance
Split-Tunnel Learning Automatic routing decisions based on app behavior

🚀 Quick Start

Install

git clone https://github.com/jery0843/torforge.git
cd torforge
make build
sudo make install

Basic Usage

# Start with default settings
sudo torforge tor -n 8

# Check status
sudo torforge status

# Stop
sudo torforge stop

Maximum Security Mode

sudo torforge tor 
  --post-quantum 
  --rotate-circuit 5 
  --decoy-traffic 30 
  --stego 
  --panic-key F12 
  -n 8

📺 What It Looks Like

🧅 TorForge Active
   🔐 Post-Quantum: CRYSTALS-Kyber768 ACTIVE
   📊 NIST Level: 3 | Key ID: a1b2c3d4e5f6
   🎭 Decoy Traffic: 30% active
   🚨 Panic Key: F12 (press in terminal)
   🔄 Auto-Rotate: every 5 minutes
   Exit IP:  185.220.101.15
   Circuits: 8

   Press Ctrl+C to stop

🛡️ Security Architecture

┌─────────────────────────────────────────┐
│ Your Application                         │
└────────────────┬────────────────────────┘
                 ▼
┌─────────────────────────────────────────┐
│ iptables NAT                             │
│ → Redirect TCP to Tor TransPort         │
│ → Redirect DNS to Tor DNS               │
└────────────────┬────────────────────────┘
                 ▼
┌─────────────────────────────────────────┐
│ iptables FILTER                          │
│ → Block ICMP (ping)                      │
│ → Block UDP (except Tor DNS)             │
│ → Block IPv6                             │
│ → DEFAULT DROP (kill switch)            │
└────────────────┬────────────────────────┘
                 ▼
┌─────────────────────────────────────────┐
│ Tor Network                              │
│ Guard → Middle → Exit → Destination     │
└─────────────────────────────────────────┘

Nothing escapes.

🔐 Post-Quantum Encryption

TorForge uses CRYSTALS-Kyber768 from Cloudflare’s CIRCL library:

  • NIST Level 3 security (192-bit quantum resistant)
  • AES-256-GCM for symmetric encryption
  • New keys generated every session
  • Protects against future quantum computers

🚨 Dead Man’s Switch

When you press the panic key (e.g., F12):

  1. Immediately flushes all iptables rules
  2. Kills all network connections
  3. Terminates Tor process
  4. Clears browser caches
  5. Wipes RAM caches
  6. Deletes shell history
  7. Exits cleanly

Total time: < 2 seconds

📊 Tech Stack

  • Language: Go 1.21+
  • Encryption: CRYSTALS-Kyber768 (Cloudflare CIRCL)
  • Network: iptables, netfilter
  • Lines of Code: 10,000+
  • Packages: 10 internal modules

🛠️ All Command Flags

sudo torforge tor --help

Flags:
  --circuits, -n      Number of circuits (default: 4)
  --post-quantum      Enable Kyber768 encryption
  --rotate-circuit    Auto-rotate every N minutes
  --decoy-traffic     Generate N% fake traffic
  --stego             Steganography mode
  --panic-key         Dead man's switch key
  --auto-bridge       Auto-discover bridges
  --exit-nodes, -e    Preferred exit countries
  --bypass, -b        Bypass patterns

📈 What’s Next?

  • [ ] GUI dashboard (Electron/Wails)
  • [ ] macOS support
  • [ ] Android companion app
  • [ ] Traffic visualization
  • [ ] More pluggable transports

GitHub: github.com/jery0843/torforge

💬 Feedback Welcome!

I’d love to hear your thoughts:

  • What features would you want to see?
  • Any security concerns?
  • Suggestions for improvement?

Drop a comment below or open an issue on GitHub!

Total
0
Shares
Leave a Reply

Your email address will not be published. Required fields are marked *

Previous Post

Winner

Next Post

The AI Bubble: Why I’m Getting Out Before 2026

Related Posts