SkillAgentSearch skills...

Torgate

TorGate – Route all system traffic, DNS queries, and applications through Tor

Install / Use

/learn @rezacho/Torgate
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

TorGate

Force all system traffic through the Tor network.

TorGate is a transparent proxy tool for Debian-based Linux systems that routes every connection through Tor — not just your browser, but all traffic from every application on your system. If Tor goes down, all traffic is blocked. Nothing leaks.

Features

  • Transparent proxy — all system traffic routed through Tor via iptables
  • Kill switch — if Tor disconnects, all traffic is blocked (no leaks)
  • DNS protection — all DNS queries routed through Tor
  • MAC spoofing — randomizes MAC addresses on all active interfaces
  • IPv6 disabled — prevents IPv6 leak vectors entirely
  • Bridge support — obfs4, snowflake, and meek_lite for censored networks
  • Safe rollback — Ctrl+C during startup or any failure restores your original settings

Requirements

  • Debian-based Linux (Ubuntu, Kali, Mint, etc.)
  • Root access

Support for Arch, Fedora, and other distributions is coming soon.

Installation

git clone https://github.com/rezacho/torgate.git
cd torgate
sudo ./install.sh

The installer handles all dependencies automatically (tor, obfs4proxy, snowflake-client, curl).

Quick Start

# Start — route all traffic through Tor
sudo torgate start

# Check status and your Tor exit IP
sudo torgate status

# Stop — restore normal connection
sudo torgate stop

Bridge Support

If Tor is blocked in your network, use a bridge to bypass censorship:

sudo torgate start -o          # obfs4 — fast, defeats DPI (recommended)
sudo torgate start -s          # snowflake — looks like video chat
sudo torgate start -m          # meek_lite — hardest to block, slowest

Before using bridges, add your bridge lines to the config file:

sudo nano /etc/torgate/torgate.conf

Get free bridges from:

  • https://bridges.torproject.org
  • https://t.me/GetBridgesBot
  • Email bridges@torproject.org with: get transport obfs4

Note: Do not include the Bridge prefix that torproject.org provides. Use obfs4 1.2.3.4:443 ... not Bridge obfs4 1.2.3.4:443 ...

How It Works

Starting — TorGate backs up your current network settings, then:

  1. Spoofs MAC addresses on all active interfaces
  2. Disables IPv6 system-wide
  3. Configures iptables to redirect all TCP through Tor's TransPort and all DNS through Tor's DNSPort
  4. Sets default iptables policy to DROP — only Tor can reach the internet
  5. Starts Tor and verifies the connection

Stopping — TorGate restores everything to its original state:

  1. Stops Tor
  2. Restores iptables, DNS, torrc, and MAC addresses
  3. Re-enables IPv6

Verbose Mode

To see full Tor logs during startup (useful for debugging):

sudo torgate start -v
sudo torgate start -o -v       # combine with bridge option

Uninstall

sudo torgate uninstall

Or use the standalone uninstall script:

sudo ./uninstall.sh

Security Notes

TorGate provides strong system-level anonymity, but keep in mind:

  • Browser fingerprinting can still identify you
  • Application protocols like torrents can leak identity
  • Personal accounts — logging into identifiable accounts defeats anonymity

License

This project is licensed under the GNU General Public License v3.0.

View on GitHub
GitHub Stars61
CategoryDevelopment
Updated22d ago
Forks11

Languages

Shell

Security Score

95/100

Audited on Mar 14, 2026

No findings