Route your internet traffic anonymously through the Tor network, directly from your terminal.
_ _ _ _ _____ ______ ______ _ _
| | | | \ | |/ ____| ____| ____| \ | |
| | | | \| | (___ | |__ | |__ | \| |
| | | | . ` |\___ \| __| | __| | . ` |
| |__| | |\ |____) | |____| |____| |\ |
\____/|_| \_|_____/|______|______|_| \_|
Unseen is not a traditional VPN — it is a Tor-based anonymizer that routes your traffic through the onion network.
- Starts a Tor process on your machine
- Optionally rotates your IP automatically at a chosen interval
- Optionally enables a Kill Switch to block all traffic if Tor drops unexpectedly
- Lets you choose a fixed exit node country, or let Tor pick automatically (only when rotation is disabled)
- Detects if Tor ignores the exit node constraint and lets you retry or switch
- Routes all network traffic through the Tor SOCKS5 proxy (
127.0.0.1:9050) - DNS leak protection — forces every DNS query through Tor's
DNSPortso your ISP cannot see what you're resolving - Transparent proxy (Linux) — redirects all TCP traffic through Tor via
iptablesNAT, so every application is routed through Tor even if it ignores system proxy settings - Split tunneling — list domains or IPs in
domains.txtto bypass Tor for specific destinations (useful for streaming, banking, or sites that block Tor) - Shows your anonymous IP, country, region and city once connected
- On exit (
CTRL+C), automatically stops Tor and resets all proxy, DNS and firewall settings
Clone the repository and run the installer:
git clone https://github.com/vladkotov92/unseen.git
cd unseen
bash install.shbash unseen.shOn virtual machines (VMs), configure the browser's Network Settings to use Manual proxy configuration. Set the SOCKS Host to 127.0.0.1 and the Port to 9050.
On every run you will be asked a series of questions before connecting:
1. IP rotation
[?] Enable IP rotation? [y/n]:
If you choose y, you will be asked how often to rotate (in seconds):
[?] Rotate every how many seconds? (min 10):
Tor will start with a random exit node and automatically change identity at the specified interval, refreshing your IP and location info each time.
2. Kill Switch
[?] Enable Kill Switch? (blocks all traffic if Tor drops) [y/n]:
If enabled, all outbound traffic is blocked the moment Tor drops unexpectedly — your real IP is never exposed. On Linux this is enforced via iptables; on macOS via a background monitor that triggers an immediate disconnect.
3. Exit node country (only when rotation is disabled)
[+] Exit node country (e.g. US, DE, NL, FR, IT)
Press ENTER to let Tor choose automatically:
Type a country code (e.g. DE, NL, US) or press ENTER to let Tor choose automatically.
Once connected you will see:
Connection active
──────────────────────
IP: 192.42.116.100
Country: The Netherlands
Region: North Holland
City: Amsterdam
──────────────────────
Press CTRL+C to disconnect | CTRL+R to restart
If the requested exit country is unavailable, the script will detect it and ask:
[!] Tor ignored StrictNodes: got DE instead of RU
[?] What do you want to do?
1) Choose a different country
2) Let Tor choose automatically
Choice [1/2]:
Press CTRL+C at any time to disconnect. The script will automatically stop Tor and restore your original network settings.
Press CTRL+R at any time to do a full restart — cleans up Tor, the Kill Switch, the transparent proxy and the DNS overrides, then re-runs the script from the beginning so you can choose new settings.
DNS leak protection is always enabled — no prompt, no opt-out.
Tor is configured with DNSPort 9053 and AutomapHostsOnResolve 1, so it acts as a local DNS resolver that routes queries through the onion network.
- On Linux,
/etc/resolv.confis locked (chattr +i) tonameserver 127.0.0.1and aniptablesNAT rule redirects all port 53 traffic (UDP/TCP) to127.0.0.1:9053. Your ISP never sees a single DNS query. - On macOS, every active network service has its DNS servers overridden to
127.0.0.1vianetworksetup -setdnsservers, with the original values backed up and restored on exit.
On Linux, Unseen adds a transparent proxy layer so that every application — including browsers that ignore system proxy settings — goes through Tor.
It works by:
- Adding
TransPort 9040andVirtualAddrNetworkIPv4 10.192.0.0/10to Tor's config - Creating an
iptablesNAT chain (UNSEEN_TP) that redirects all outgoing TCP traffic to127.0.0.1:9040, while:- Leaving Tor's own traffic untouched (matched by its system user, e.g.
debian-tor) - Skipping loopback and private LAN ranges
- Redirecting Tor's virtual address range (
10.192.0.0/10) back to the TransPort
- Leaving Tor's own traffic untouched (matched by its system user, e.g.
Requires a dedicated Tor system user (debian-tor, tor, or _tor) to avoid traffic loops. The installer ensures Tor is installed from your distro's package manager, which creates this user automatically.
On macOS the transparent proxy is not needed — networksetup -setsocksfirewallproxy applies system-wide and browsers honor it.
Unseen supports split tunneling via a plain-text file at the repo root: domains.txt.
Any destination listed there bypasses Tor and uses your real connection. Useful for:
- Streaming services that block Tor exits (Netflix, banking portals)
- Local servers, NAS, internal corporate resources
- Any site that flat-out refuses Tor traffic
One entry per line. Comments start with #. Three formats are accepted:
# Domain name (resolved to its real IP at script startup)
github.com
# IPv4 address
1.1.1.1
# CIDR range (Linux only)
192.168.10.0/24
- Linux: domains are resolved with
getent ahostsv4before DNS is dirottato on Tor. The resolved IPs are written to/etc/hosts(so future lookups skip Tor) and added asRETURNrules in theUNSEEN_TPiptables NAT chain. If the Kill Switch is active, the same IPs are also added asACCEPTrules inUNSEEN_KS. - macOS: domains are resolved with
dscacheutil -q hostand written to/etc/hosts. All entries are also added to every network service's SOCKS proxy bypass list vianetworksetup -setproxybypassdomains.
Both platforms back up /etc/hosts (and the macOS bypass lists) before modifying them and restore them cleanly on exit.
- IPs are resolved once at script startup. If the domain's IPs change (common with large CDNs like Cloudflare), press
CTRL+Rto reloaddomains.txt. - Browsers cache DNS — you may need to restart the browser (or flush its internal DNS cache) after enabling/disabling split tunneling for an already-open session.
- If the destination is in
domains.txtbut still appears to go through Tor, checksudo iptables -t nat -L UNSEEN_TP -n(Linux) ornetworksetup -getproxybypassdomains <service>(macOS).
Once connected, verify that everything is actually routed through Tor:
- IP check — https://check.torproject.org Should say "Congratulations. This browser is configured to use Tor."
- DNS leak test — https://dnsleaktest.com → run the Extended test
You should see only Tor exit-relay resolvers. No ISP, Google (
8.8.8.8), or Cloudflare (1.1.1.1) resolvers. - IPv6 / WebRTC — https://ipleak.net The IP shown must match the Tor exit node, not your real address.
- Split tunnel check — with a domain (e.g.
ifconfig.me) listed indomains.txt:curl ifconfig.me # → your real IP (bypassed Tor) curl --socks5 127.0.0.1:9050 https://icanhazip.com # → a Tor exit IP
Some countries have many reliable exit nodes, others have few or none.
| Works well | Unreliable or unavailable |
|---|---|
NL, DE, FR, SE, CH |
RU, CN, IR, BY |
US, CA, FI, GB, AT |
(blocked or removed from Tor consensus) |
- Asks whether to enable IP rotation
- Asks whether to enable the Kill Switch
- If rotation is disabled, asks for an exit node country (optional); if enabled, exit node is picked randomly
- Writes a
torrcwithSocksPort 9050,DNSPort 9053, and (on Linux)TransPort 9040 - Stops any existing Tor instance to avoid conflicts
- Starts Tor and waits for a full bootstrap (100%)
- Enables the SOCKS5 proxy on all active network interfaces
- Reads
domains.txt(if present) — resolves any domains to real IPs while the original DNS is still active, writes/etc/hostsentries and records the IPs for firewall exceptions - Locks system DNS to
127.0.0.1so all queries go through Tor's DNSPort - (Linux) Installs
iptablesNAT rules to transparently redirect all TCP + DNS traffic through Tor, withRETURNexceptions for the split tunnel IPs - If Kill Switch is enabled, enforces traffic blocking rules (Linux:
iptableschain withACCEPTfor split tunnel IPs; macOS: background monitor) - Fetches your anonymous IP and location through the Tor circuit
- Verifies the exit country matches the requested one (only when rotation is off) — if not, prompts to retry
- If rotation is on, changes Tor identity and refreshes connection info at the chosen interval
- On exit, tears down in reverse order: Kill Switch → transparent proxy → split tunnel (
/etc/hosts+ bypass list) → DNS overrides → SOCKS proxy → Tor process
- Your exit node IP may differ between requests — this is normal Tor behavior
StrictNodes 1tells Tor to only use the specified country, but some countries have no usable exit nodes and Tor may fall back to another country- Some websites may block known Tor exit nodes
A Russian Boy
GitHub: https://github.com/vladkotov92
MIT — see LICENSE