/tor-and-onion-networks:tor-running-relays-bridges-and-hardwarefrom tor-and-onion-networks
Covers running Tor infrastructure: middle/guard relays, obfs4/WebTunnel bridges, Snowflake proxies, exit relays, transparent-proxy gateways, Raspberry Pi builds, two-box isolation, SecureDrop architecture, and legal/abuse handling.
Ships in tor-and-onion-networks. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Part 8 of 8 of the Tor and Onion Networks reference (plugin
tor-and-onion-networks), covering §13.5 and handbook §2–§6. Sibling skills:tor-protocol-circuits-and-cell-cryptography(§1–§5),tor-network-consensus-guards-and-paths(§6–§7),tor-onion-services-and-hardening(§8–§9),tor-censorship-circumvention-and-bridges(§10),tor-attack-literature-and-threat-model(§11),tor-ecosystem-alternatives-and-governance(§12, §14–§16),tor-building-on-tor-software-patterns(§13.1–§13.4 and handbook §1). Section numbers are shared across the set; a reference written as §N →skillpoints into that sibling skill.Currency: compiled 16 September 2026. Config checked against C tor 0.4.9.x. Consult
man torand https://community.torproject.org/ — especially the good/bad-ISP list — before buying hosting.Scope note: nothing here routes around the law. Relays, bridges and onion services are legal in most jurisdictions and abused in the same way roads are — run them openly, with notices, and handle abuse like an adult (§6).
⚠️ Choose by what your IP can absorb: home line → bridge or Snowflake. Clean VPS → middle/guard. Dedicated IP + abuse-tolerant host + paperwork → exit.
⚠️ GOTCHA boxes mark where an operator's reasonable assumption produces a leak, a dead SD card, or an abuse complaint they cannot answer.
The three ideas that organize this document:
- ⚠️ BRIDGES ARE THE HIGHEST-VALUE HOME CONTRIBUTION (§2.2, §2.4). A home IP is bad for an exit and perfect for a bridge — residential, stable addresses are exactly what censored users need, and bridges attract essentially no abuse mail.
- ⚠️ TRANSPARENT PROXYING IS CONVENIENCE, TWO BOXES ARE ASSURANCE (§3.3, §4.4). A gateway that shares a machine with the thing it protects can be bypassed by whatever roots that machine. When the Tor box is the only route out, a fully compromised workstation still cannot learn the public IP.
- ⚠️ THE EXIT'S REAL PREREQUISITE IS A MAILBOX YOU ANSWER (§2.5, §6). The technical configuration is four lines. The operational commitment is reverse DNS, an exit notice, a dedicated IP, and replying to abuse — the volunteer network's social license depends on operators who do that.
Decision tree: home line → bridge or Snowflake proxy. VPS/colo with clean IP + abuse-tolerant host → middle/guard relay. Dedicated IP, hostile-abuse-tolerant host, willingness to do paperwork → exit. Consult the community portal's good/bad-ISP list before buying anything.
# Use Tor Project's own repo, not the distro's (fresher; 0.4.9.x as of 2026):
# https://community.torproject.org/relay/setup/guard/debian-ubuntu/
sudo apt install tor nyx
# /etc/tor/torrc — middle/guard relay
ORPort 443
Nickname PickSomethingUnique
ContactInfo [email protected]
ExitRelay 0 # default, stated to be explicit
BandwidthRate 20 MBytes
BandwidthBurst 25 MBytes
AccountingMax 4 TBytes # cap monthly traffic if your host meters
AccountingStart month 1 0:00
MetricsPort 127.0.0.1:9035
MetricsPortPolicy accept 127.0.0.1
OfflineMasterKey 1 after moving ed25519_master_id_secret_key off the
box (keep ed25519_master_id_public_key present).tor --keygen-family, proposal 321) and keep
the legacy MyFamily cross-listing until client adoption saturates (§7.3 →
tor-network-consensus-guards-and-paths).⚠️ GOTCHA: relays ramp slowly. First-month traffic is a trickle. That is consensus-weight design (§6.1 →
tor-network-consensus-guards-and-paths), not misconfiguration — do not go chasing a bug that isn't there.
BridgeRelay 1
ORPort 9001
ServerTransportPlugin obfs4 exec /usr/bin/obfs4proxy
ServerTransportListenAddr obfs4 0.0.0.0:8443
ExtORPort auto
ContactInfo [email protected]
The complete Bridge obfs4 ... line (with cert + iat-mode) lands in
/var/lib/tor/pt_state/obfs4_bridgeline.txt — that's what a censored user pastes into Tor
Browser; you don't have to distribute it yourself (BridgeDB pulls bridges automatically).
Docker alternative: thetorproject/obfs4-bridge. Bridges want stable IPs; the address is
the secret (§10.2 → tor-censorship-circumvention-and-bridges).
Co-locates with a real HTTPS site on your host (WebSocket-like upgrade path shared between a
reverse proxy and the bridge). Guide: community.torproject.org/relay/setup/webtunnel/. As of
March 2026 the official Docker image lagged; operators were advised to build from source —
check the guide's current note. Value: works in protocol-allowlist networks where obfs4's
random-looking bytes get killed by default.
docker run -d --network host thetorproject/snowflake-proxy:latest
# or: standalone binary; or just leave the Tor Browser add-on enabled in a pinned tab
A few Mbps, NAT-friendly by WebRTC design, runs anywhere. Because Russia began DTLS-fingerprint
blocking in March 2026, run the current standalone proxy (≥ v2.13.1, which ships the
covert-dtls mimicry — §10.3 → tor-censorship-circumvention-and-bridges). Your proxy IP is
never published; the broker matches clients to proxies.
ExitRelay 1
ReducedExitPolicy 1 # sane port set; blocks 25 and usual abuse ports
# (0.4.9 added Monero ports to this policy)
Mandatory homework first:
tor-exit-notice.html
(contrib/operator-tools/tor-exit-notice.html) on port 80 of your exit IP and set PTR to
something unambiguous. This single artifact quietly resolves most complaints.ReevaluateExitPolicy and the new DoSStream* token-bucket
limiters for stream/resolve floods.If you have decided you need your own network rather than onion services on the public one
(§13.6 → tor-building-on-tor-software-patterns), this is the operator checklist:
tor-building-on-tor-software-patterns).⚠️ GOTCHA: the authorities are the trust root (§6.2 →
tor-network-consensus-guards-and-paths). Three of them on one provider, in one rack, under one administrator is not a trust root — it is a single point of compromise wearing a consensus protocol. Public Tor's nine are run by nine named people in different organizations and jurisdictions for exactly this reason, and a private network that skips that property has skipped the point.
Give the app its own SocksPort (isolation by construction), or a TransPort+DNSPort pair
bound to a dedicated local subnet. Prefer SocksPort whenever the app cooperates (§13.1 →
tor-building-on-tor-software-patterns).
socks5h. Command-line resolve through Tor: tor-resolve.DNSPort 5353 + firewall redirect (§3.3). Tor resolves via exit-side streams;
TTLs are clipped to 60s in 0.4.9 (cache-oracle mitigation).VirtualAddrNetworkIPv4 10.192.0.0/10
AutomapHostsOnResolve 1
TransPort 192.168.42.1:9040
DNSPort 192.168.42.1:5353
Then redirect transit traffic (nftables sketch — adapt to your host; the tor daemon's uid must be exempt or it eats its own traffic):
nft add table ip tor
nft 'add chain ip tor prerouting { type nat hook prerouting priority dstnat; }'
nft add rule ip tor prerouting iifname "lan0" meta l4proto tcp dnat to 192.168.42.1:9040
nft add rule ip tor prerouting iifname "lan0" udp dport 53 dnat to 192.168.42.1:5353
⚠️ GOTCHA — honest limits of transparent proxying: UDP-only apps fail or must be blocked (block them — silently is fine); apps pinning certificates/keys may break; and "the gateway saw everything" metadata still exists on the LAN side. For assurance use two boxes (§4.4): the Tor box is the only route out, full stop.
BOM: Pi 4/5 (2–4 GB), decent SD or USB SSD, 5 V/3 A PSU. All-in ≈ $75; ~5 W always-on.
tor-protocol-circuits-and-cell-cryptography) — expect
tens of Mbps of relayed throughput, uplink-willing.MaxAdvertisedBandwidth to ~70% of your real uplink; add
AvoidDiskWrites 1 or move to SSD — SD cards die of log+descriptor churn.GL.iNet Mango/Slate/Beryl-class OpenWrt boxes: install tor + the §3.3 transparent-proxy
config, or use models/3rd-party firmware with built-in Tor modes (InvizBox sells this
pre-canned).
⚠️ GOTCHA: MIPS/ARM SoCs without crypto extensions cap out in the low tens of Mbps. Treat these as convenience devices for untrusted Wi-Fi, not high-assurance rigs — the network layer is enforced, but endpoint hygiene still lives on your laptop (§11.8 →
tor-attack-literature-and-threat-model).
Any idle SBC or old laptop + §2.4 (Snowflake) or §2.2 (obfs4 bridge). This is the cheapest real help you can give censored users; bridges want residential-looking, stable IPs, so a quiet home box is better than a datacenter for this role.
Pattern (Whonix's model, in hardware): Box A (gateway) — tor + TransPort/DNSPort +
fail-closed nftables; it is the only device with a route to the internet. Box B
(workstation) — single ethernet link to A, no Wi-Fi, no other interfaces; all its traffic
transits Tor by physics, not by configuration discipline. A root-level compromise of B
still can't learn the public IP. Qubes 4.3 + Whonix 18 virtualizes the same topology on one
well-supported machine (§12.2 → tor-ecosystem-alternatives-and-governance).
The reference "serious hardware" onion deployment (docs.securedrop.org):
The transferable lessons for any high-stakes build: separate the viewing environment from the receiving environment by an air gap; authenticate the service itself, not just its users; FDE + offline identity keys; and assume the box will eventually be seized or rooted — design so that's survivable.
https://check.torproject.org/api/ip from every path you claim is
Tor-routed; confirm the reported IP is a current exit on Relay Search / ExoneraTor.torsocks curl http://<addr>.onion), watch hs_pow_* metrics under load-test, confirm
offline-master rotation procedure on a staging service first.ReducedExitPolicy unless you know why you're widening it.tor-building-on-tor-software-patterns.tor-network-consensus-guards-and-paths.tor-censorship-circumvention-and-bridges.tor-onion-services-and-hardening.What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub the-vibey-project/vibey --plugin tor-and-onion-networksOther plugins' skills for the same job
8 skills in this plugin
/tor-attack-literature-and-threat-modelUse when assessing what actually threatens Tor users, or when checking a deanonymization claim against the literature — end-to-end confirmation, website fingerprinting and why no defense ships by default, guard discovery, Sybil and malicious-relay campaigns (KAX17, the 2020 exit wave), exit content attacks, HSDir harvesting, DoS, and client-side compromise. Covers §11. Companion to the other Tor and onion-network skills./tor-building-on-tor-software-patternsUse when writing code that talks to Tor — SOCKS with socks5h and stream isolation, the control port, ephemeral onion services via ADD_ONION or stem, long-lived onion services in torrc, client authorization v3, Onion-Location and Alt-Svc headers, torsocks and its limits, embedding Arti, testing against a private chutney network, and building your own private or custom onion-routing network. Covers §13.1–§13.4, §13.6 and handbook §1. Companion to the other Tor and onion-network skills.