[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7ASGNVS8KXHFXXXYYHMCTFG":3,"skill-same:01M7ASGNVS8KXHFXXXYYHMCTFG":48},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":29,"ownerHtmlUrl":30,"ownerBlogUrl":31,"ownerDescription":32,"updatedAt":33,"install":34,"resources":47},"01M7ASGNVS8KXHFXXXYYHMCTFG","tor-running-relays-bridges-and-hardware",null,"Use when running Tor infrastructure — middle and guard relays, obfs4 and WebTunnel bridges, Snowflake proxies, exit relays and their prerequisites, transparent-proxy gateways, DNS-leak prevention, Raspberry Pi and travel-router builds, two-box isolation, the SecureDrop architecture, the operator checklist for running a private Tor network, verification checklists, and legal and abuse handling. Covers §13.5 and handbook §2–§6. Companion to the other Tor and onion-network skills.","the-vibey-project\u002Fvibey","the-vibey-project","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F329298758?v=4","01M7AJHGZ9722CTJ4JNQZVRH0Q","the vibey project","01M7AJHGZVMG2K7TGXQ6XFHVG3",5,"MIT","https:\u002F\u002Fgithub.com\u002Fthe-vibey-project\u002Fvibey\u002Fblob\u002Fdevelop\u002Fsrc\u002Fvibey_tools\u002Fskills\u002Fplugins\u002Ftor-and-onion-networks\u002Fskills\u002Ftor-running-relays-bridges-and-hardware\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: tor-running-relays-bridges-and-hardware\ndescription: \"Use when running Tor infrastructure — middle and guard relays, obfs4 and WebTunnel bridges, Snowflake proxies, exit relays and their prerequisites, transparent-proxy gateways, DNS-leak prevention, Raspberry Pi and travel-router builds, two-box isolation, the SecureDrop architecture, the operator checklist for running a private Tor network, verification checklists, and legal and abuse handling. Covers §13.5 and handbook §2–§6. Companion to the other Tor and onion-network skills.\"\n---\n\n# Running Tor Infrastructure: Relays, Bridges, Gateways, Hardware\n\n> **Part 8 of 8** of the *Tor and Onion Networks* reference (plugin `tor-and-onion-networks`),\n> covering §13.5 and handbook §2–§6. Sibling skills:\n> `tor-protocol-circuits-and-cell-cryptography` (§1–§5),\n> `tor-network-consensus-guards-and-paths` (§6–§7),\n> `tor-onion-services-and-hardening` (§8–§9),\n> `tor-censorship-circumvention-and-bridges` (§10),\n> `tor-attack-literature-and-threat-model` (§11),\n> `tor-ecosystem-alternatives-and-governance` (§12, §14–§16),\n> `tor-building-on-tor-software-patterns` (§13.1–§13.4 and handbook §1).\n> Section numbers are shared across the set; a reference written as §N → `skill` points into\n> that sibling skill.\n>\n> **Currency:** compiled 16 September 2026. Config checked against C tor **0.4.9.x**. Consult\n> `man tor` and \u003Chttps:\u002F\u002Fcommunity.torproject.org\u002F> — especially the good\u002Fbad-ISP list —\n> before buying hosting.\n>\n> **Scope note:** nothing here routes around the law. Relays, bridges and onion services are\n> legal in most jurisdictions and abused in the same way roads are — run them openly, with\n> notices, and handle abuse like an adult (§6).\n\n> **⚠️ Choose by what your IP can absorb: home line → bridge or Snowflake. Clean VPS →\n> middle\u002Fguard. Dedicated IP + abuse-tolerant host + paperwork → exit.**\n>\n> **⚠️ GOTCHA** boxes mark where an operator's reasonable assumption produces a leak, a dead\n> SD card, or an abuse complaint they cannot answer.\n>\n> **The three ideas that organize this document:**\n> 1. **⚠️ BRIDGES ARE THE HIGHEST-VALUE HOME CONTRIBUTION** (§2.2, §2.4). **A home IP is bad\n>    for an exit and perfect for a bridge — residential, stable addresses are exactly what\n>    censored users need, and bridges attract essentially no abuse mail.**\n> 2. **⚠️ TRANSPARENT PROXYING IS CONVENIENCE, TWO BOXES ARE ASSURANCE** (§3.3, §4.4).\n>    **A gateway that shares a machine with the thing it protects can be bypassed by whatever\n>    roots that machine. When the Tor box is the *only* route out, a fully compromised\n>    workstation still cannot learn the public IP.**\n> 3. **⚠️ THE EXIT'S REAL PREREQUISITE IS A MAILBOX YOU ANSWER** (§2.5, §6). **The technical\n>    configuration is four lines. The operational commitment is reverse DNS, an exit notice,\n>    a dedicated IP, and replying to abuse — the volunteer network's social license depends\n>    on operators who do that.**\n\n---\n\n## §13.5 \u002F Handbook §2. Running infrastructure (the network thanks you)\n\nDecision tree: **home line** → bridge or Snowflake proxy. **VPS\u002Fcolo with clean IP +\nabuse-tolerant host** → middle\u002Fguard relay. **Dedicated IP, hostile-abuse-tolerant host,\nwillingness to do paperwork** → exit. Consult the community portal's good\u002Fbad-ISP list before\nbuying anything.\n\n### §2.1 Middle relay (Debian\u002FUbuntu)\n\n```bash\n# Use Tor Project's own repo, not the distro's (fresher; 0.4.9.x as of 2026):\n#   https:\u002F\u002Fcommunity.torproject.org\u002Frelay\u002Fsetup\u002Fguard\u002Fdebian-ubuntu\u002F\nsudo apt install tor nyx\n```\n\n```\n# \u002Fetc\u002Ftor\u002Ftorrc — middle\u002Fguard relay\nORPort 443\nNickname PickSomethingUnique\nContactInfo your-email@example.org\nExitRelay 0                 # default, stated to be explicit\nBandwidthRate 20 MBytes\nBandwidthBurst 25 MBytes\nAccountingMax 4 TBytes      # cap monthly traffic if your host meters\nAccountingStart month 1 0:00\nMetricsPort 127.0.0.1:9035\nMetricsPortPolicy accept 127.0.0.1\n```\n\n- Relay appears on [Relay Search](https:\u002F\u002Fmetrics.torproject.org\u002Frs.html) within a few hours;\n  flags (Fast\u002FGuard\u002FHSDir) accrue over days–weeks of uptime.\n- Identity hygiene: `OfflineMasterKey 1` after moving `ed25519_master_id_secret_key` off the\n  box (keep `ed25519_master_id_public_key` present).\n- 0.4.9-era families: publish a **family key** (`tor --keygen-family`, proposal 321) *and* keep\n  the legacy `MyFamily` cross-listing until client adoption saturates (§7.3 →\n  `tor-network-consensus-guards-and-paths`).\n\n> **⚠️ GOTCHA:** relays ramp **slowly**. First-month traffic is a trickle. That is\n> consensus-weight design (§6.1 → `tor-network-consensus-guards-and-paths`), not\n> misconfiguration — do not go chasing a bug that isn't there.\n\n### §2.2 obfs4 bridge (the highest-value home contribution)\n\n```\nBridgeRelay 1\nORPort 9001\nServerTransportPlugin obfs4 exec \u002Fusr\u002Fbin\u002Fobfs4proxy\nServerTransportListenAddr obfs4 0.0.0.0:8443\nExtORPort auto\nContactInfo your-email@example.org\n```\n\nThe complete `Bridge obfs4 ...` line (with cert + iat-mode) lands in\n`\u002Fvar\u002Flib\u002Ftor\u002Fpt_state\u002Fobfs4_bridgeline.txt` — that's what a censored user pastes into Tor\nBrowser; you don't have to distribute it yourself (BridgeDB pulls bridges automatically).\nDocker alternative: `thetorproject\u002Fobfs4-bridge`. Bridges want stable IPs; **the address *is*\nthe secret** (§10.2 → `tor-censorship-circumvention-and-bridges`).\n\n### §2.3 WebTunnel bridge\n\nCo-locates with a real HTTPS site on your host (WebSocket-like upgrade path shared between a\nreverse proxy and the bridge). Guide: `community.torproject.org\u002Frelay\u002Fsetup\u002Fwebtunnel\u002F`. As of\nMarch 2026 the official Docker image lagged; operators were advised to build from source —\ncheck the guide's current note. Value: works in protocol-allowlist networks where obfs4's\nrandom-looking bytes get killed by default.\n\n### §2.4 Snowflake proxy (the zero-hassle contribution)\n\n```bash\ndocker run -d --network host thetorproject\u002Fsnowflake-proxy:latest\n# or: standalone binary; or just leave the Tor Browser add-on enabled in a pinned tab\n```\n\nA few Mbps, NAT-friendly by WebRTC design, runs anywhere. Because Russia began DTLS-fingerprint\nblocking in March 2026, run the current standalone proxy (**≥ v2.13.1**, which ships the\ncovert-dtls mimicry — §10.3 → `tor-censorship-circumvention-and-bridges`). Your proxy IP is\nnever published; the broker matches clients to proxies.\n\n### §2.5 Exit relay (read twice, run once)\n\n```\nExitRelay 1\nReducedExitPolicy 1        # sane port set; blocks 25 and usual abuse ports\n                           # (0.4.9 added Monero ports to this policy)\n```\n\nMandatory homework first:\n\n1. **A reverse-DNS + web notice.** Serve the Tor Project's `tor-exit-notice.html`\n   (`contrib\u002Foperator-tools\u002Ftor-exit-notice.html`) on port 80 of your exit IP and set PTR to\n   something unambiguous. This single artifact quietly resolves most complaints.\n2. **A dedicated IP** (not shared with anything you care about) and an abuse-tolerant host.\n3. **An abuse mailbox you actually answer** (auto-reply pointing to ExoneraTor and the exit\n   list resolves most tickets; see §6).\n4. **Never run an exit on a residential line; never run one at work.**\n5. Consider 0.4.9 features: `ReevaluateExitPolicy` and the new `DoSStream*` token-bucket\n   limiters for stream\u002Fresolve floods.\n\n### §2.6 Running a private Tor network\n\nIf you have decided you need your own network rather than onion services on the public one\n(§13.6 → `tor-building-on-tor-software-patterns`), this is the operator checklist:\n\n1. **At least 3 directory authorities**, run on different infrastructure, in different\n   locations, under different administrators — they are the trust root (see the gotcha\n   below).\n2. **Size the relay set to the deployment; there is no protocol-level relay-count minimum.**\n   Three distinct relays is the floor for building a three-hop circuit at all, a test or\n   permissioned deployment sized to its own known traffic can be legitimately small, and a\n   public-facing service needs enough to carry peak load with capacity left over when some\n   are down. Size against **bandwidth** (peak throughput plus headroom, remembering every\n   circuit spends that capacity at three relays); **failure tolerance** (how many relays can\n   drop before circuits fail or capacity does); **path diversity** (enough distinct\n   operators, subnets and providers that the no-shared-operator and no-shared-subnet\n   constraints still leave usable paths); and the **anonymity set** you intend to offer — a\n   network small enough that a relay operator can guess who is talking provides no anonymity\n   at any relay count. Pick the target from those four, write down the reasoning, and\n   re-derive it when traffic or the threat model changes.\n3. **Custom consensus parameters** configured, and **client software pointing at your\n   authorities**, not the public ones.\n4. **Chutney for testing before deployment** (§13.4c →\n   `tor-building-on-tor-software-patterns`).\n5. **Network monitoring and relay health checks** — nyx locally, MetricsPort\u002FPrometheus\n   externally (handbook §5, check 3).\n6. **A plan for Sybil resistance.** Your network is smaller than public Tor and therefore\n   cheaper to attack: consider requiring relay operators to be known, or running a\n   **permissioned** model outright.\n7. **Physical diversity of infrastructure**, and **NTP-disciplined clocks on every node** —\n   anonymity systems are clock-sensitive (handbook §5, check 5).\n\n> **⚠️ GOTCHA:** the authorities *are* the trust root (§6.2 →\n> `tor-network-consensus-guards-and-paths`). Three of them on one provider, in one rack, under\n> one administrator is not a trust root — it is a single point of compromise wearing a\n> consensus protocol. Public Tor's nine are run by nine named people in different\n> organizations and jurisdictions for exactly this reason, and a private network that skips\n> that property has skipped the point.\n\n---\n\n## Handbook §3. Networking patterns\n\n### §3.1 Selective app routing without touching the app\n\nGive the app its own `SocksPort` (isolation by construction), or a `TransPort`+`DNSPort` pair\nbound to a dedicated local subnet. Prefer SocksPort whenever the app cooperates (§13.1 →\n`tor-building-on-tor-software-patterns`).\n\n### §3.2 DNS without leaks\n\n- In-app: `socks5h`. Command-line resolve through Tor: `tor-resolve`.\n- Whole-machine: `DNSPort 5353` + firewall redirect (§3.3). Tor resolves via exit-side streams;\n  TTLs are clipped to 60s in 0.4.9 (cache-oracle mitigation).\n\n### §3.3 Transparent proxy gateway (Tor router)\n\n```\nVirtualAddrNetworkIPv4 10.192.0.0\u002F10\nAutomapHostsOnResolve 1\nTransPort 192.168.42.1:9040\nDNSPort  192.168.42.1:5353\n```\n\nThen redirect transit traffic (nftables sketch — adapt to your host; **the tor daemon's uid\nmust be exempt or it eats its own traffic**):\n\n```\nnft add table ip tor\nnft 'add chain ip tor prerouting { type nat hook prerouting priority dstnat; }'\nnft add rule ip tor prerouting iifname \"lan0\" meta l4proto tcp dnat to 192.168.42.1:9040\nnft add rule ip tor prerouting iifname \"lan0\" udp dport 53 dnat to 192.168.42.1:5353\n```\n\n> **⚠️ GOTCHA — honest limits of transparent proxying:** UDP-only apps fail or must be blocked\n> (block them — silently is fine); apps pinning certificates\u002Fkeys may break; and \"the gateway\n> saw everything\" metadata still exists on the LAN side. For assurance use two boxes (§4.4):\n> the Tor box is the *only* route out, full stop.\n\n---\n\n## Handbook §4. Hardware builds\n\n### §4.1 Raspberry Pi middle relay (the classic)\n\n**BOM**: Pi 4\u002F5 (2–4 GB), decent SD or USB SSD, 5 V\u002F3 A PSU. All-in ≈ $75; ~5 W always-on.\n\n- 64-bit Raspberry Pi OS Lite; the Cortex-A72\u002FA76 have ARMv8 crypto extensions, so AES\u002FPOLYVAL\n  paths are hardware-assisted (§4.2 → `tor-protocol-circuits-and-cell-cryptography`) — expect\n  tens of Mbps of relayed throughput, uplink-willing.\n- Use deb.torproject.org apt; set `MaxAdvertisedBandwidth` to ~70% of your real uplink; add\n  `AvoidDiskWrites 1` or move to SSD — **SD cards die of log+descriptor churn**.\n- Do **not** make it an exit (your home IP takes the abuse mail) — middle or obfs4 bridge.\n\n### §4.2 Travel-router Tor gateway\n\nGL.iNet Mango\u002FSlate\u002FBeryl-class OpenWrt boxes: install `tor` + the §3.3 transparent-proxy\nconfig, or use models\u002F3rd-party firmware with built-in Tor modes (InvizBox sells this\npre-canned).\n\n> **⚠️ GOTCHA:** MIPS\u002FARM SoCs without crypto extensions cap out in the low tens of Mbps.\n> Treat these as *convenience* devices for untrusted Wi-Fi, not high-assurance rigs — the\n> network layer is enforced, but endpoint hygiene still lives on your laptop (§11.8 →\n> `tor-attack-literature-and-threat-model`).\n\n### §4.3 The Snowflake\u002Fbridge headless mini-box\n\nAny idle SBC or old laptop + §2.4 (Snowflake) or §2.2 (obfs4 bridge). This is the cheapest real\nhelp you can give censored users; bridges want residential-looking, stable IPs, so a quiet home\nbox is *better* than a datacenter for this role.\n\n### §4.4 Two-box isolation gateway (physical Whonix)\n\nPattern (Whonix's model, in hardware): **Box A** (gateway) — tor + TransPort\u002FDNSPort +\nfail-closed nftables; it is the *only* device with a route to the internet. **Box B**\n(workstation) — single ethernet link to A, no Wi-Fi, no other interfaces; all its traffic\ntransits Tor **by physics, not by configuration discipline**. A root-level compromise of B\nstill can't learn the public IP. Qubes 4.3 + Whonix 18 virtualizes the same topology on one\nwell-supported machine (§12.2 → `tor-ecosystem-alternatives-and-governance`).\n\n### §4.5 Vault-grade: the SecureDrop architecture (study this even if you never run one)\n\nThe reference \"serious hardware\" onion deployment (docs.securedrop.org):\n\n- **App + Monitor servers** behind dedicated firewall, FDE (LUKS), onion service only — no\n  clearnet exposure at all.\n- **Air-gapped Secure Viewing Station**: Tails on a machine that *never* networks; submissions\n  cross the air gap on dedicated transfer media after decryption on the SVS.\n- Admin\u002Fjournalist Tails sticks with persistence isolated per role; v3 client auth on the onion\n  interfaces so the services are invisible without keys.\n\nThe transferable lessons for any high-stakes build: **separate the *viewing* environment from\nthe *receiving* environment by an air gap; authenticate the service itself, not just its users;\nFDE + offline identity keys; and assume the box will eventually be seized or rooted — design so\nthat's survivable.**\n\n---\n\n## Handbook §5. Verification & monitoring checklist\n\n1. **Egress identity**: `https:\u002F\u002Fcheck.torproject.org\u002Fapi\u002Fip` from every path you claim is\n   Tor-routed; confirm the reported IP is a current exit on Relay Search \u002F ExoneraTor.\n2. **DNS**: tcpdump the physical interface while the app resolves — you should see *no*\n   upstream queries except the tor process's own.\n3. **Relay health**: nyx locally; Relay Search + MetricsPort\u002FPrometheus externally; first flags\n   within days, Guard eligibility after ~weeks of stability, HSDir after Fast+Stable.\n4. **Onion service**: fetch the descriptor via a second tor instance\n   (`torsocks curl http:\u002F\u002F\u003Caddr>.onion`), watch `hs_pow_*` metrics under load-test, confirm\n   offline-master rotation procedure on a staging service first.\n5. **Time**: anonymity systems are clock-sensitive (consensus validity, blinded-key periods).\n   Disciplined NTP on everything. (Over Tor? NTP is UDP — use chrony over clearnet on gateway\n   boxes; the risk model allows it.)\n\n---\n\n## Handbook §6. Legal, ethical & abuse-handling box\n\n- Running relays, bridges, exits, and onion services is legal in the US, EU, and most\n  democracies; *usage of them* is regulated like any internet use. A handful of states block or\n  restrict Tor — that's censorship of users, not generally criminalization of operators. The\n  EFF's *Tor Legal FAQ* and the Tor Project's abuse templates are the two documents to read\n  before plugging anything in.\n- **Middle relays** and **bridges** attract essentially no complaints; their IPs never touch\n  destination servers. **Exits** attract automated abuse mail regularly — answer it with the\n  standard response (point to ExoneraTor + exit docs, confirm no logging), and keep\n  `ReducedExitPolicy` unless you know why you're widening it.\n- Don't run exits from home or work IPs; **don't log user traffic** (it adds liability, not\n  protection); don't run services whose purpose is harm — the volunteer network's social\n  license is the thin thing standing between this infrastructure and legislated blocking, and\n  operators are its custodians.\n- Censorship-circumvention tooling (bridges, Snowflake, PTs) exists for the users the Tor\n  Project names: dissidents, journalists, abuse survivors, ordinary people behind hostile\n  networks. Build accordingly.\n\n---\n\n## Where to go next\n\n- Writing code that talks to Tor: §13.1–§13.4 → `tor-building-on-tor-software-patterns`.\n- What the flags, weights and consensus your relay is joining actually are: §6 →\n  `tor-network-consensus-guards-and-paths`.\n- Which transport to run, and what censors are currently blocking: §10 →\n  `tor-censorship-circumvention-and-bridges`.\n- Hardening an onion service you host on this hardware: §9 →\n  `tor-onion-services-and-hardening`.\n","# Running Tor Infrastructure: Relays, Bridges, Gateways, Hardware\n\n> **Part 8 of 8** of the *Tor and Onion Networks* reference (plugin `tor-and-onion-networks`),\n> covering §13.5 and handbook §2–§6. Sibling skills:\n> `tor-protocol-circuits-and-cell-cryptography` (§1–§5),\n> `tor-network-consensus-guards-and-paths` (§6–§7),\n> `tor-onion-services-and-hardening` (§8–§9),\n> `tor-censorship-circumvention-and-bridges` (§10),\n> `tor-attack-literature-and-threat-model` (§11),\n> `tor-ecosystem-alternatives-and-governance` (§12, §14–§16),\n> `tor-building-on-tor-software-patterns` (§13.1–§13.4 and handbook §1).\n> Section numbers are shared across the set; a reference written as §N → `skill` points into\n> that sibling skill.\n>\n> **Currency:** compiled 16 September 2026. Config checked against C tor **0.4.9.x**. Consult\n> `man tor` and \u003Chttps:\u002F\u002Fcommunity.torproject.org\u002F> — especially the good\u002Fbad-ISP list —\n> before buying hosting.\n>\n> **Scope note:** nothing here routes around the law. Relays, bridges and onion services are\n> legal in most jurisdictions and abused in the same way roads are — run them openly, with\n> notices, and handle abuse like an adult (§6).\n\n> **⚠️ Choose by what your IP can absorb: home line → bridge or Snowflake. Clean VPS →\n> middle\u002Fguard. Dedicated IP + abuse-tolerant host + paperwork → exit.**\n>\n> **⚠️ GOTCHA** boxes mark where an operator's reasonable assumption produces a leak, a dead\n> SD card, or an abuse complaint they cannot answer.\n>\n> **The three ideas that organize this document:**\n> 1. **⚠️ BRIDGES ARE THE HIGHEST-VALUE HOME CONTRIBUTION** (§2.2, §2.4). **A home IP is bad\n>    for an exit and perfect for a bridge — residential, stable addresses are exactly what\n>    censored users need, and bridges attract essentially no abuse mail.**\n> 2. **⚠️ TRANSPARENT PROXYING IS CONVENIENCE, TWO BOXES ARE ASSURANCE** (§3.3, §4.4).\n>    **A gateway that shares a machine with the thing it protects can be bypassed by whatever\n>    roots that machine. When the Tor box is the *only* route out, a fully compromised\n>    workstation still cannot learn the public IP.**\n> 3. **⚠️ THE EXIT'S REAL PREREQUISITE IS A MAILBOX YOU ANSWER** (§2.5, §6). **The technical\n>    configuration is four lines. The operational commitment is reverse DNS, an exit notice,\n>    a dedicated IP, and replying to abuse — the volunteer network's social license depends\n>    on operators who do that.**\n\n---\n\n## §13.5 \u002F Handbook §2. Running infrastructure (the network thanks you)\n\nDecision tree: **home line** → bridge or Snowflake proxy. **VPS\u002Fcolo with clean IP +\nabuse-tolerant host** → middle\u002Fguard relay. **Dedicated IP, hostile-abuse-tolerant host,\nwillingness to do paperwork** → exit. Consult the community portal's good\u002Fbad-ISP list before\nbuying anything.\n\n### §2.1 Middle relay (Debian\u002FUbuntu)\n\n```bash\n# Use Tor Project's own repo, not the distro's (fresher; 0.4.9.x as of 2026):\n#   https:\u002F\u002Fcommunity.torproject.org\u002Frelay\u002Fsetup\u002Fguard\u002Fdebian-ubuntu\u002F\nsudo apt install tor nyx\n```\n\n```\n# \u002Fetc\u002Ftor\u002Ftorrc — middle\u002Fguard relay\nORPort 443\nNickname PickSomethingUnique\nContactInfo your-email@example.org\nExitRelay 0                 # default, stated to be explicit\nBandwidthRate 20 MBytes\nBandwidthBurst 25 MBytes\nAccountingMax 4 TBytes      # cap monthly traffic if your host meters\nAccountingStart month 1 0:00\nMetricsPort 127.0.0.1:9035\nMetricsPortPolicy accept 127.0.0.1\n```\n\n- Relay appears on [Relay Search](https:\u002F\u002Fmetrics.torproject.org\u002Frs.html) within a few hours;\n  flags (Fast\u002FGuard\u002FHSDir) accrue over days–weeks of uptime.\n- Identity hygiene: `OfflineMasterKey 1` after moving `ed25519_master_id_secret_key` off the\n  box (keep `ed25519_master_id_public_key` present).\n- 0.4.9-era families: publish a **family key** (`tor --keygen-family`, proposal 321) *and* keep\n  the legacy `MyFamily` cross-listing until client adoption saturates (§7.3 →\n  `tor-network-consensus-guards-and-paths`).\n\n> **⚠️ GOTCHA:** relays ramp **slowly**. First-month traffic is a trickle. That is\n> consensus-weight design (§6.1 → `tor-network-consensus-guards-and-paths`), not\n> misconfiguration — do not go chasing a bug that isn't there.\n\n### §2.2 obfs4 bridge (the highest-value home contribution)\n\n```\nBridgeRelay 1\nORPort 9001\nServerTransportPlugin obfs4 exec \u002Fusr\u002Fbin\u002Fobfs4proxy\nServerTransportListenAddr obfs4 0.0.0.0:8443\nExtORPort auto\nContactInfo your-email@example.org\n```\n\nThe complete `Bridge obfs4 ...` line (with cert + iat-mode) lands in\n`\u002Fvar\u002Flib\u002Ftor\u002Fpt_state\u002Fobfs4_bridgeline.txt` — that's what a censored user pastes into Tor\nBrowser; you don't have to distribute it yourself (BridgeDB pulls bridges automatically).\nDocker alternative: `thetorproject\u002Fobfs4-bridge`. Bridges want stable IPs; **the address *is*\nthe secret** (§10.2 → `tor-censorship-circumvention-and-bridges`).\n\n### §2.3 WebTunnel bridge\n\nCo-locates with a real HTTPS site on your host (WebSocket-like upgrade path shared between a\nreverse proxy and the bridge). Guide: `community.torproject.org\u002Frelay\u002Fsetup\u002Fwebtunnel\u002F`. As of\nMarch 2026 the official Docker image lagged; operators were advised to build from source —\ncheck the guide's current note. Value: works in protocol-allowlist networks where obfs4's\nrandom-looking bytes get killed by default.\n\n### §2.4 Snowflake proxy (the zero-hassle contribution)\n\n```bash\ndocker run -d --network host thetorproject\u002Fsnowflake-proxy:latest\n# or: standalone binary; or just leave the Tor Browser add-on enabled in a pinned tab\n```\n\nA few Mbps, NAT-friendly by WebRTC design, runs anywhere. Because Russia began DTLS-fingerprint\nblocking in March 2026, run the current standalone proxy (**≥ v2.13.1**, which ships the\ncovert-dtls mimicry — §10.3 → `tor-censorship-circumvention-and-bridges`). Your proxy IP is\nnever published; the broker matches clients to proxies.\n\n### §2.5 Exit relay (read twice, run once)\n\n```\nExitRelay 1\nReducedExitPolicy 1        # sane port set; blocks 25 and usual abuse ports\n                           # (0.4.9 added Monero ports to this policy)\n```\n\nMandatory homework first:\n\n1. **A reverse-DNS + web notice.** Serve the Tor Project's `tor-exit-notice.html`\n   (`contrib\u002Foperator-tools\u002Ftor-exit-notice.html`) on port 80 of your exit IP and set PTR to\n   something unambiguous. This single artifact quietly resolves most complaints.\n2. **A dedicated IP** (not shared with anything you care about) and an abuse-tolerant host.\n3. **An abuse mailbox you actually answer** (auto-reply pointing to ExoneraTor and the exit\n   list resolves most tickets; see §6).\n4. **Never run an exit on a residential line; never run one at work.**\n5. Consider 0.4.9 features: `ReevaluateExitPolicy` and the new `DoSStream*` token-bucket\n   limiters for stream\u002Fresolve floods.\n\n### §2.6 Running a private Tor network\n\nIf you have decided you need your own network rather than onion services on the public one\n(§13.6 → `tor-building-on-tor-software-patterns`), this is the operator checklist:\n\n1. **At least 3 directory authorities**, run on different infrastructure, in different\n   locations, under different administrators — they are the trust root (see the gotcha\n   below).\n2. **Size the relay set to the deployment; there is no protocol-level relay-count minimum.**\n   Three distinct relays is the floor for building a three-hop circuit at all, a test or\n   permissioned deployment sized to its own known traffic can be legitimately small, and a\n   public-facing service needs enough to carry peak load with capacity left over when some\n   are down. Size against **bandwidth** (peak throughput plus headroom, remembering every\n   circuit spends that capacity at three relays); **failure tolerance** (how many relays can\n   drop before circuits fail or capacity does); **path diversity** (enough distinct\n   operators, subnets and providers that the no-shared-operator and no-shared-subnet\n   constraints still leave usable paths); and the **anonymity set** you intend to offer — a\n   network small enough that a relay operator can guess who is talking provides no anonymity\n   at any relay count. Pick the target from those four, write down the reasoning, and\n   re-derive it when traffic or the threat model changes.\n3. **Custom consensus parameters** configured, and **client software pointing at your\n   authorities**, not the public ones.\n4. **Chutney for testing before deployment** (§13.4c →\n   `tor-building-on-tor-software-patterns`).\n5. **Network monitoring and relay health checks** — nyx locally, MetricsPort\u002FPrometheus\n   externally (handbook §5, check 3).\n6. **A plan for Sybil resistance.** Your network is smaller than public Tor and therefore\n   cheaper to attack: consider requiring relay operators to be known, or running a\n   **permissioned** model outright.\n7. **Physical diversity of infrastructure**, and **NTP-disciplined clocks on every node** —\n   anonymity systems are clock-sensitive (handbook §5, check 5).\n\n> **⚠️ GOTCHA:** the authorities *are* the trust root (§6.2 →\n> `tor-network-consensus-guards-and-paths`). Three of them on one provider, in one rack, under\n> one administrator is not a trust root — it is a single point of compromise wearing a\n> consensus protocol. Public Tor's nine are run by nine named people in different\n> organizations and jurisdictions for exactly this reason, and a private network that skips\n> that property has skipped the point.\n\n---\n\n## Handbook §3. Networking patterns\n\n### §3.1 Selective app routing without touching the app\n\nGive the app its own `SocksPort` (isolation by construction), or a `TransPort`+`DNSPort` pair\nbound to a dedicated local subnet. Prefer SocksPort whenever the app cooperates (§13.1 →\n`tor-building-on-tor-software-patterns`).\n\n### §3.2 DNS without leaks\n\n- In-app: `socks5h`. Command-line resolve through Tor: `tor-resolve`.\n- Whole-machine: `DNSPort 5353` + firewall redirect (§3.3). Tor resolves via exit-side streams;\n  TTLs are clipped to 60s in 0.4.9 (cache-oracle mitigation).\n\n### §3.3 Transparent proxy gateway (Tor router)\n\n```\nVirtualAddrNetworkIPv4 10.192.0.0\u002F10\nAutomapHostsOnResolve 1\nTransPort 192.168.42.1:9040\nDNSPort  192.168.42.1:5353\n```\n\nThen redirect transit traffic (nftables sketch — adapt to your host; **the tor daemon's uid\nmust be exempt or it eats its own traffic**):\n\n```\nnft add table ip tor\nnft 'add chain ip tor prerouting { type nat hook prerouting priority dstnat; }'\nnft add rule ip tor prerouting iifname \"lan0\" meta l4proto tcp dnat to 192.168.42.1:9040\nnft add rule ip tor prerouting iifname \"lan0\" udp dport 53 dnat to 192.168.42.1:5353\n```\n\n> **⚠️ GOTCHA — honest limits of transparent proxying:** UDP-only apps fail or must be blocked\n> (block them — silently is fine); apps pinning certificates\u002Fkeys may break; and \"the gateway\n> saw everything\" metadata still exists on the LAN side. For assurance use two boxes (§4.4):\n> the Tor box is the *only* route out, full stop.\n\n---\n\n## Handbook §4. Hardware builds\n\n### §4.1 Raspberry Pi middle relay (the classic)\n\n**BOM**: Pi 4\u002F5 (2–4 GB), decent SD or USB SSD, 5 V\u002F3 A PSU. All-in ≈ $75; ~5 W always-on.\n\n- 64-bit Raspberry Pi OS Lite; the Cortex-A72\u002FA76 have ARMv8 crypto extensions, so AES\u002FPOLYVAL\n  paths are hardware-assisted (§4.2 → `tor-protocol-circuits-and-cell-cryptography`) — expect\n  tens of Mbps of relayed throughput, uplink-willing.\n- Use deb.torproject.org apt; set `MaxAdvertisedBandwidth` to ~70% of your real uplink; add\n  `AvoidDiskWrites 1` or move to SSD — **SD cards die of log+descriptor churn**.\n- Do **not** make it an exit (your home IP takes the abuse mail) — middle or obfs4 bridge.\n\n### §4.2 Travel-router Tor gateway\n\nGL.iNet Mango\u002FSlate\u002FBeryl-class OpenWrt boxes: install `tor` + the §3.3 transparent-proxy\nconfig, or use models\u002F3rd-party firmware with built-in Tor modes (InvizBox sells this\npre-canned).\n\n> **⚠️ GOTCHA:** MIPS\u002FARM SoCs without crypto extensions cap out in the low tens of Mbps.\n> Treat these as *convenience* devices for untrusted Wi-Fi, not high-assurance rigs — the\n> network layer is enforced, but endpoint hygiene still lives on your laptop (§11.8 →\n> `tor-attack-literature-and-threat-model`).\n\n### §4.3 The Snowflake\u002Fbridge headless mini-box\n\nAny idle SBC or old laptop + §2.4 (Snowflake) or §2.2 (obfs4 bridge). This is the cheapest real\nhelp you can give censored users; bridges want residential-looking, stable IPs, so a quiet home\nbox is *better* than a datacenter for this role.\n\n### §4.4 Two-box isolation gateway (physical Whonix)\n\nPattern (Whonix's model, in hardware): **Box A** (gateway) — tor + TransPort\u002FDNSPort +\nfail-closed nftables; it is the *only* device with a route to the internet. **Box B**\n(workstation) — single ethernet link to A, no Wi-Fi, no other interfaces; all its traffic\ntransits Tor **by physics, not by configuration discipline**. A root-level compromise of B\nstill can't learn the public IP. Qubes 4.3 + Whonix 18 virtualizes the same topology on one\nwell-supported machine (§12.2 → `tor-ecosystem-alternatives-and-governance`).\n\n### §4.5 Vault-grade: the SecureDrop architecture (study this even if you never run one)\n\nThe reference \"serious hardware\" onion deployment (docs.securedrop.org):\n\n- **App + Monitor servers** behind dedicated firewall, FDE (LUKS), onion service only — no\n  clearnet exposure at all.\n- **Air-gapped Secure Viewing Station**: Tails on a machine that *never* networks; submissions\n  cross the air gap on dedicated transfer media after decryption on the SVS.\n- Admin\u002Fjournalist Tails sticks with persistence isolated per role; v3 client auth on the onion\n  interfaces so the services are invisible without keys.\n\nThe transferable lessons for any high-stakes build: **separate the *viewing* environment from\nthe *receiving* environment by an air gap; authenticate the service itself, not just its users;\nFDE + offline identity keys; and assume the box will eventually be seized or rooted — design so\nthat's survivable.**\n\n---\n\n## Handbook §5. Verification & monitoring checklist\n\n1. **Egress identity**: `https:\u002F\u002Fcheck.torproject.org\u002Fapi\u002Fip` from every path you claim is\n   Tor-routed; confirm the reported IP is a current exit on Relay Search \u002F ExoneraTor.\n2. **DNS**: tcpdump the physical interface while the app resolves — you should see *no*\n   upstream queries except the tor process's own.\n3. **Relay health**: nyx locally; Relay Search + MetricsPort\u002FPrometheus externally; first flags\n   within days, Guard eligibility after ~weeks of stability, HSDir after Fast+Stable.\n4. **Onion service**: fetch the descriptor via a second tor instance\n   (`torsocks curl http:\u002F\u002F\u003Caddr>.onion`), watch `hs_pow_*` metrics under load-test, confirm\n   offline-master rotation procedure on a staging service first.\n5. **Time**: anonymity systems are clock-sensitive (consensus validity, blinded-key periods).\n   Disciplined NTP on everything. (Over Tor? NTP is UDP — use chrony over clearnet on gateway\n   boxes; the risk model allows it.)\n\n---\n\n## Handbook §6. Legal, ethical & abuse-handling box\n\n- Running relays, bridges, exits, and onion services is legal in the US, EU, and most\n  democracies; *usage of them* is regulated like any internet use. A handful of states block or\n  restrict Tor — that's censorship of users, not generally criminalization of operators. The\n  EFF's *Tor Legal FAQ* and the Tor Project's abuse templates are the two documents to read\n  before plugging anything in.\n- **Middle relays** and **bridges** attract essentially no complaints; their IPs never touch\n  destination servers. **Exits** attract automated abuse mail regularly — answer it with the\n  standard response (point to ExoneraTor + exit docs, confirm no logging), and keep\n  `ReducedExitPolicy` unless you know why you're widening it.\n- Don't run exits from home or work IPs; **don't log user traffic** (it adds liability, not\n  protection); don't run services whose purpose is harm — the volunteer network's social\n  license is the thin thing standing between this infrastructure and legislated blocking, and\n  operators are its custodians.\n- Censorship-circumvention tooling (bridges, Snowflake, PTs) exists for the users the Tor\n  Project names: dissidents, journalists, abuse survivors, ordinary people behind hostile\n  networks. Build accordingly.\n\n---\n\n## Where to go next\n\n- Writing code that talks to Tor: §13.1–§13.4 → `tor-building-on-tor-software-patterns`.\n- What the flags, weights and consensus your relay is joining actually are: §6 →\n  `tor-network-consensus-guards-and-paths`.\n- Which transport to run, and what censors are currently blocking: §10 →\n  `tor-censorship-circumvention-and-bridges`.\n- Hardening an onion service you host on this hardware: §9 →\n  `tor-onion-services-and-hardening`.\n",{"name":5,"description":7},"develop","ae32736a1aabddabca5d2c96d665aa0ebc7d8700","src\u002Fvibey_tools\u002Fskills\u002Fplugins\u002Ftor-and-onion-networks\u002Fskills\u002Ftor-running-relays-bridges-and-hardware",3,"https:\u002F\u002Fgithub.com\u002Fthe-vibey-project\u002Fvibey","https:\u002F\u002Fthe-vibey-project.github.io\u002Fvibey\u002F","https:\u002F\u002Fgithub.com\u002Fthe-vibey-project","https:\u002F\u002Fvibewithadam.matthewsteinberger.com","freedom for software engineers","2026-11-15 05:47:42",{"source":8,"skillName":5,"commands":35,"prompt":45,"zipAvailable":46},[36,39,42],{"tool":37,"command":38},"npx","npx skills add the-vibey-project\u002Fvibey --skill tor-running-relays-bridges-and-hardware",{"tool":40,"command":41},"bunx","bunx skills add the-vibey-project\u002Fvibey --skill tor-running-relays-bridges-and-hardware",{"tool":43,"command":44},"pnpm","pnpm dlx skills add the-vibey-project\u002Fvibey --skill tor-running-relays-bridges-and-hardware","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fthe-vibey-project\u002Fvibey\u002Fblob\u002Fdevelop\u002Fsrc\u002Fvibey_tools\u002Fskills\u002Fplugins\u002Ftor-and-onion-networks\u002Fskills\u002Ftor-running-relays-bridges-and-hardware\u002FSKILL.md",true,[],[49,56,63,70,77,84],{"skillNo":50,"name":51,"nameZh":6,"description":52,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":53,"categories":54,"keywords":55,"publishedAt":19},"01M7AT1FQJAE1FQYAMDTF490Y4","white-paper-writing","Use when writing white papers, technical reports, policy documents, thought leadership pieces, or any long-form authoritative document. Triggers on requests to write, structure, outline, or review white papers, technical reports, position papers, policy briefs, or evidence-driven arguments. Also use for B2B content marketing strategy, technical documentation requiring authority, academic-style reports, or any document that must educate while persuading. Use when someone asks \"how should I structure this\" for a long-form document.","https:\u002F\u002Fgithub.com\u002Fthe-vibey-project\u002Fvibey\u002Fblob\u002Fdevelop\u002Fsrc\u002Fvibey_tools\u002Fskills\u002Fplugins\u002Fwriting-craft\u002Fskills\u002Fwhite-paper-writing\u002FSKILL.md",[],[],{"skillNo":57,"name":58,"nameZh":6,"description":59,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":60,"categories":61,"keywords":62,"publishedAt":19},"01M7AT16BJRJJKK2MASXRZS76G","prose-technical-mechanics","Use when editing or writing prose at a technical\u002Fmechanical level: choosing between Anglo-Saxon and Latinate diction, placing information in topic vs stress positions, writing periodic vs cumulative sentences, handling sentence rhythm, punctuation as logic, transitions, paragraph structure, or phonesthetics. Use when someone wants to understand WHY prose works or doesn't, not just surface-level style advice. Triggers on word choice, sentence structure, emphasis, rhythm, diction, or any deep writing mechanics question.","https:\u002F\u002Fgithub.com\u002Fthe-vibey-project\u002Fvibey\u002Fblob\u002Fdevelop\u002Fsrc\u002Fvibey_tools\u002Fskills\u002Fplugins\u002Fwriting-craft\u002Fskills\u002Fprose-technical-mechanics\u002FSKILL.md",[],[],{"skillNo":64,"name":65,"nameZh":6,"description":66,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":67,"categories":68,"keywords":69,"publishedAt":19},"01M7AT0W9HT0ZZ9Y287NW99MR3","prose-mechanics","Use when writing, editing, or analyzing prose style; when trying to avoid generic AI-sounding writing; when applying specific prose styles such as journalistic, academic, narrative, KJV biblical, Hemingway plain, Latinate\u002FJamesian, Orwellian, Augustan, Victorian, Early Modern (Bacon, Browne, Milton), or free indirect discourse; or when coaching someone on writing voice and mechanics. Triggers on any request to improve, analyze, or write in a specific prose style, to fix \"AI-sounding\" writing, to make prose more vivid or concrete, to vary sentence rhythm, or to understand how a particular writer achieves their effects.","https:\u002F\u002Fgithub.com\u002Fthe-vibey-project\u002Fvibey\u002Fblob\u002Fdevelop\u002Fsrc\u002Fvibey_tools\u002Fskills\u002Fplugins\u002Fwriting-craft\u002Fskills\u002Fprose-mechanics\u002FSKILL.md",[],[],{"skillNo":71,"name":72,"nameZh":6,"description":73,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":74,"categories":75,"keywords":76,"publishedAt":19},"01M7AT0KR635JX66X2X6F3E2CP","narrative-structure","Use when structuring stories, pitches, presentations, white papers, or any persuasive narrative; analyzing the hero's journey in fiction or non-fiction; applying StoryBrand for business communication; designing narrative arcs for thought leadership; or understanding Vogler, Snyder, Propp, or Campbell frameworks. Triggers on any narrative structure, storytelling, pitch structure, StoryBrand, hero's journey, three-act structure, Freytag, Save the Cat, narrative arc, or \"how should I structure this story\u002Fpitch\u002Fpresentation\" request.","https:\u002F\u002Fgithub.com\u002Fthe-vibey-project\u002Fvibey\u002Fblob\u002Fdevelop\u002Fsrc\u002Fvibey_tools\u002Fskills\u002Fplugins\u002Fwriting-craft\u002Fskills\u002Fnarrative-structure\u002FSKILL.md",[],[],{"skillNo":78,"name":79,"nameZh":6,"description":80,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":81,"categories":82,"keywords":83,"publishedAt":19},"01M7AT0AKGW09NKKZDYBT8VRDE","legal-brief-writing","Use when writing legal briefs, motions, or any court filing; when analyzing judicial cognition and persuasion; when applying elite brief-writing techniques from Roberts, Clement, Kagan, Garner; or when structuring legal arguments for maximum persuasion. Also use for autistic\u002Fneurodivergent advocates who need to understand how their natural communication style maps to elite legal advocacy. Triggers on any legal writing, brief drafting, motion preparation, or legal argument structuring request.","https:\u002F\u002Fgithub.com\u002Fthe-vibey-project\u002Fvibey\u002Fblob\u002Fdevelop\u002Fsrc\u002Fvibey_tools\u002Fskills\u002Fplugins\u002Fwriting-craft\u002Fskills\u002Flegal-brief-writing\u002FSKILL.md",[],[],{"skillNo":85,"name":86,"nameZh":6,"description":87,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":88,"categories":89,"keywords":90,"publishedAt":19},"01M7AT00VWPS4Q8B5VEMXX9NQT","journal-publishability-criteria","Use whenever a research paper, article or preprint is being written, revised, reviewed or published, and specifically before every publication of docs\u002Fpaper.md. Covers what legitimate journals actually gate on, in order of gating — the editor's desk screen (scope, novelty, package problems), what reviewers judge (methodological soundness, claims the evidence can carry, statistical and qualitative reporting), EQUATOR reporting guidelines, the ICMJE authorship criteria, COPE's view of text recycling, the near-universal generative-AI policy (no AI author, disclosure, author responsibility), TOP 2025 transparency standards, how to verify a journal is legitimate, submitting without an institution, and a pre-submission checklist. Triggers on requests to evaluate, review, prepare or submit a paper, to judge publishability, to write a declarations or data-availability section, to disclose AI use, or to check a journal.","https:\u002F\u002Fgithub.com\u002Fthe-vibey-project\u002Fvibey\u002Fblob\u002Fdevelop\u002Fsrc\u002Fvibey_tools\u002Fskills\u002Fplugins\u002Fwriting-craft\u002Fskills\u002Fjournal-publishability-criteria\u002FSKILL.md",[],[]]