diff options
| author | Bitflash <admin@bitflash.network> | 2026-08-13 14:21:15 -0300 |
|---|---|---|
| committer | Bitflash <admin@bitflash.network> | 2026-08-13 14:21:15 -0300 |
| commit | 5dec9b16a5b98ed0e24ec7113b867f22be2d0026 (patch) | |
| tree | e06544e9e7516203bc4309460438a0486b0328e4 /docs | |
| parent | c009e7cc0c5093f4c4add741cb9d131d19956871 (diff) | |
| parent | 1bf78c53404d83638177889590ce199c87af63bc (diff) | |
Merge pull request 'net: add managed Tor hidden service bootstrap' (#33) from embedded-tor-manager into main
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/rendezvous.md | 8 | ||||
| -rw-r--r-- | docs/tor.md | 52 |
2 files changed, 51 insertions, 9 deletions
diff --git a/docs/rendezvous.md b/docs/rendezvous.md index e1888b9..68b5df3 100644 --- a/docs/rendezvous.md +++ b/docs/rendezvous.md | |||
| @@ -308,9 +308,11 @@ tunnel. | |||
| 308 | unreachable, discovery stalls until one is reachable again. Relay TLS is | 308 | unreachable, discovery stalls until one is reachable again. Relay TLS is |
| 309 | verified, which closes a man in the middle path on discovery, but availability | 309 | verified, which closes a man in the middle path on discovery, but availability |
| 310 | still rests on the relay set. | 310 | still rests on the relay set. |
| 311 | - **Direct onion is not automatic Tor configuration.** Bitflash signs and | 311 | - **Direct onion needs Tor.** With `-managedtor`, Bitflash starts a Tor process, |
| 312 | advertises a hidden-service endpoint, and Tor-mode peers can dial it. The Tor | 312 | writes a local hidden-service config, and advertises the generated onion |
| 313 | daemon still owns hidden-service creation, private keys, rotation and uptime. | 313 | endpoint. With `-onionservice`, an operator can still run Tor manually and |
| 314 | provide the endpoint. In both cases Tor owns the hidden-service private key and | ||
| 315 | uptime. | ||
| 314 | 316 | ||
| 315 | ## 11. Wire reference | 317 | ## 11. Wire reference |
| 316 | 318 | ||
diff --git a/docs/tor.md b/docs/tor.md index b4f88f9..1c0f589 100644 --- a/docs/tor.md +++ b/docs/tor.md | |||
| @@ -36,6 +36,47 @@ If both `-tor` and `-socks` are present, Tor mode wins and the node prints a | |||
| 36 | warning. That keeps a command line with `-tor` from silently becoming a custom | 36 | warning. That keeps a command line with `-tor` from silently becoming a custom |
| 37 | proxy route. | 37 | proxy route. |
| 38 | 38 | ||
| 39 | ## Managed Tor mode | ||
| 40 | |||
| 41 | `-managedtor` starts a Tor process for this node, writes a local `torrc`, creates | ||
| 42 | a v3 hidden service for the normal Bitflash P2P listener, routes outbound | ||
| 43 | discovery through that Tor instance, and signs the generated `.onion:8433` | ||
| 44 | endpoint into the node's `.btf` descriptor. | ||
| 45 | |||
| 46 | ```bash | ||
| 47 | bitflash -managedtor | ||
| 48 | ``` | ||
| 49 | |||
| 50 | Without a value, Bitflash looks for Tor in this order: | ||
| 51 | |||
| 52 | 1. `tor/tor.exe` or `tor/tor` beside the Bitflash binary; | ||
| 53 | 2. `tor.exe` or `tor` beside the Bitflash binary; | ||
| 54 | 3. `tor.exe` or `tor` on `PATH`. | ||
| 55 | |||
| 56 | To point at a specific Tor executable: | ||
| 57 | |||
| 58 | ```bash | ||
| 59 | bitflash -managedtor=/opt/tor/bin/tor | ||
| 60 | bitflash -managedtor=C:\Tor Browser\Browser\TorBrowser\Tor\tor.exe | ||
| 61 | ``` | ||
| 62 | |||
| 63 | Managed Tor writes its state under the Bitflash data directory: | ||
| 64 | |||
| 65 | ```text | ||
| 66 | managed-tor/ | ||
| 67 | torrc | ||
| 68 | data/ | ||
| 69 | onion-service/ | ||
| 70 | ``` | ||
| 71 | |||
| 72 | The private key for the onion address lives in `managed-tor/onion-service/`. | ||
| 73 | Back up that directory if you want the same onion address after moving the node. | ||
| 74 | Delete it only if you intentionally want a fresh onion endpoint. | ||
| 75 | |||
| 76 | `-managedtor` takes precedence over `-tor` and `-socks`, because it must choose | ||
| 77 | the local SOCKS port it starts. Diagnostics report the current managed Tor | ||
| 78 | state, including the SOCKS port and onion endpoint once Tor has generated it. | ||
| 79 | |||
| 39 | When Tor mode is enabled: | 80 | When Tor mode is enabled: |
| 40 | 81 | ||
| 41 | - outbound Nostr relay dials use Tor; | 82 | - outbound Nostr relay dials use Tor; |
| @@ -100,10 +141,10 @@ bitflash -operator -tor \ | |||
| 100 | -announcerelay=exampleexampleexampleexampleexampleexampleexampleexample.onion:8434 | 141 | -announcerelay=exampleexampleexampleexampleexampleexampleexampleexample.onion:8434 |
| 101 | ``` | 142 | ``` |
| 102 | 143 | ||
| 103 | ## Direct full-node hidden service | 144 | ## Manual direct full-node hidden service |
| 104 | 145 | ||
| 105 | The legacy P2P listener still binds to port `8433`. You can expose it through | 146 | Managed Tor is the preferred path for ordinary nodes. Operators can still expose |
| 106 | Tor manually: | 147 | the P2P listener through a separately managed Tor service: |
| 107 | 148 | ||
| 108 | ```text | 149 | ```text |
| 109 | HiddenServiceDir /var/lib/tor/bitflash-node/ | 150 | HiddenServiceDir /var/lib/tor/bitflash-node/ |
| @@ -139,6 +180,5 @@ This means rendezvous relays stop being the only way to reach a node that has | |||
| 139 | published a hidden service. They remain useful bootstrap/fallback infrastructure, | 180 | published a hidden service. They remain useful bootstrap/fallback infrastructure, |
| 140 | but an already-discovered onion-capable peer can be reached directly over Tor. | 181 | but an already-discovered onion-capable peer can be reached directly over Tor. |
| 141 | 182 | ||
| 142 | The node does not create or rotate Tor hidden services itself. Tor owns the | 183 | Tor owns the private key under `HiddenServiceDir`; back it up if you want the |
| 143 | private key under `HiddenServiceDir`; back it up if you want the onion name to | 184 | onion name to stay stable. |
| 144 | stay stable. | ||