upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorBitflash <admin@bitflash.network>2026-08-13 14:21:15 -0300
committerBitflash <admin@bitflash.network>2026-08-13 14:21:15 -0300
commit5dec9b16a5b98ed0e24ec7113b867f22be2d0026 (patch)
treee06544e9e7516203bc4309460438a0486b0328e4 /docs
parentc009e7cc0c5093f4c4add741cb9d131d19956871 (diff)
parent1bf78c53404d83638177889590ce199c87af63bc (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.md8
-rw-r--r--docs/tor.md52
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
36warning. That keeps a command line with `-tor` from silently becoming a custom 36warning. That keeps a command line with `-tor` from silently becoming a custom
37proxy route. 37proxy route.
38 38
39## Managed Tor mode
40
41`-managedtor` starts a Tor process for this node, writes a local `torrc`, creates
42a v3 hidden service for the normal Bitflash P2P listener, routes outbound
43discovery through that Tor instance, and signs the generated `.onion:8433`
44endpoint into the node's `.btf` descriptor.
45
46```bash
47bitflash -managedtor
48```
49
50Without a value, Bitflash looks for Tor in this order:
51
521. `tor/tor.exe` or `tor/tor` beside the Bitflash binary;
532. `tor.exe` or `tor` beside the Bitflash binary;
543. `tor.exe` or `tor` on `PATH`.
55
56To point at a specific Tor executable:
57
58```bash
59bitflash -managedtor=/opt/tor/bin/tor
60bitflash -managedtor=C:\Tor Browser\Browser\TorBrowser\Tor\tor.exe
61```
62
63Managed Tor writes its state under the Bitflash data directory:
64
65```text
66managed-tor/
67 torrc
68 data/
69 onion-service/
70```
71
72The private key for the onion address lives in `managed-tor/onion-service/`.
73Back up that directory if you want the same onion address after moving the node.
74Delete it only if you intentionally want a fresh onion endpoint.
75
76`-managedtor` takes precedence over `-tor` and `-socks`, because it must choose
77the local SOCKS port it starts. Diagnostics report the current managed Tor
78state, including the SOCKS port and onion endpoint once Tor has generated it.
79
39When Tor mode is enabled: 80When 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
105The legacy P2P listener still binds to port `8433`. You can expose it through 146Managed Tor is the preferred path for ordinary nodes. Operators can still expose
106Tor manually: 147the P2P listener through a separately managed Tor service:
107 148
108```text 149```text
109HiddenServiceDir /var/lib/tor/bitflash-node/ 150HiddenServiceDir /var/lib/tor/bitflash-node/
@@ -139,6 +180,5 @@ This means rendezvous relays stop being the only way to reach a node that has
139published a hidden service. They remain useful bootstrap/fallback infrastructure, 180published a hidden service. They remain useful bootstrap/fallback infrastructure,
140but an already-discovered onion-capable peer can be reached directly over Tor. 181but an already-discovered onion-capable peer can be reached directly over Tor.
141 182
142The node does not create or rotate Tor hidden services itself. Tor owns the 183Tor owns the private key under `HiddenServiceDir`; back it up if you want the
143private key under `HiddenServiceDir`; back it up if you want the onion name to 184onion name to stay stable.
144stay stable.