upleb.uk

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

summaryrefslogtreecommitdiff
path: root/docs/tor.md
diff options
context:
space:
mode:
authorNsable-sh <nsable-sh@noreply.git.bitflash.network>2026-08-13 11:11:59 -0300
committerNsable-sh <nsable-sh@noreply.git.bitflash.network>2026-08-13 11:11:59 -0300
commitd2b86473a267c960a1f0c012a983176e5d962187 (patch)
tree002423e5987a3c544f469befae83519ccb29fffb /docs/tor.md
parent851811b43be38bea48ba5d04d16987bd541dca53 (diff)
net: add signed direct onion peer endpoints
Diffstat (limited to 'docs/tor.md')
-rw-r--r--docs/tor.md39
1 files changed, 35 insertions, 4 deletions
diff --git a/docs/tor.md b/docs/tor.md
index 69b29f1..b4f88f9 100644
--- a/docs/tor.md
+++ b/docs/tor.md
@@ -40,6 +40,8 @@ When Tor mode is enabled:
40 40
41- outbound Nostr relay dials use Tor; 41- outbound Nostr relay dials use Tor;
42- outbound `.btf` rendezvous relay dials use Tor; 42- outbound `.btf` rendezvous relay dials use Tor;
43- outbound direct peer dials prefer signed `.onion` endpoints when a peer
44 advertises one;
43- destination names are sent to Tor as SOCKS5 domain-name CONNECT requests, so 45- destination names are sent to Tor as SOCKS5 domain-name CONNECT requests, so
44 the local DNS resolver does not see them; 46 the local DNS resolver does not see them;
45- direct `.onion` dials are refused unless a SOCKS5/Tor proxy is enabled; 47- direct `.onion` dials are refused unless a SOCKS5/Tor proxy is enabled;
@@ -98,7 +100,7 @@ bitflash -operator -tor \
98 -announcerelay=exampleexampleexampleexampleexampleexampleexampleexample.onion:8434 100 -announcerelay=exampleexampleexampleexampleexampleexampleexampleexample.onion:8434
99``` 101```
100 102
101## Full-node hidden service 103## Direct full-node hidden service
102 104
103The legacy P2P listener still binds to port `8433`. You can expose it through 105The legacy P2P listener still binds to port `8433`. You can expose it through
104Tor manually: 106Tor manually:
@@ -108,6 +110,35 @@ HiddenServiceDir /var/lib/tor/bitflash-node/
108HiddenServicePort 8433 127.0.0.1:8433 110HiddenServicePort 8433 127.0.0.1:8433
109``` 111```
110 112
111Current automatic peer discovery is `.btf`/rendezvous based, not onion-address 113After restarting Tor, read the generated onion name:
112gossip. Treat direct full-node onion access as an operator/admin tool unless a 114
113future release adds first-class onion peer advertisements. 115```bash
116sudo cat /var/lib/tor/bitflash-node/hostname
117```
118
119Then start Bitflash with Tor outbound enabled and advertise that hidden service:
120
121```bash
122bitflash -tor \
123 -onionservice=exampleexampleexampleexampleexampleexampleexampleexample.onion:8433
124```
125
126That onion endpoint is signed into this node's self-certifying `.btf`
127descriptor. New peers that resolve the descriptor and also run with `-tor` try
128the `.onion:8433` P2P connection first. If it fails, they fall back to the
129ordinary encrypted rendezvous path. Older nodes ignore the onion field and still
130use the rendezvous relay because the descriptor keeps the legacy signature too.
131
132If the node has `-onionservice` but has not registered at any rendezvous relay
133yet, it can still publish an onion-capable descriptor with
134`meeting_node = rendezvous-pending`. Tor-capable peers can dial the hidden
135service directly from that descriptor. Rendezvous becomes a fallback, not a
136precondition for being discoverable.
137
138This means rendezvous relays stop being the only way to reach a node that has
139published a hidden service. They remain useful bootstrap/fallback infrastructure,
140but an already-discovered onion-capable peer can be reached directly over Tor.
141
142The node does not create or rotate Tor hidden services itself. Tor owns the
143private key under `HiddenServiceDir`; back it up if you want the onion name to
144stay stable.