diff options
| author | Nsable-sh <nsable-sh@noreply.git.bitflash.network> | 2026-08-13 11:11:59 -0300 |
|---|---|---|
| committer | Nsable-sh <nsable-sh@noreply.git.bitflash.network> | 2026-08-13 11:11:59 -0300 |
| commit | d2b86473a267c960a1f0c012a983176e5d962187 (patch) | |
| tree | 002423e5987a3c544f469befae83519ccb29fffb /docs/tor.md | |
| parent | 851811b43be38bea48ba5d04d16987bd541dca53 (diff) | |
net: add signed direct onion peer endpoints
Diffstat (limited to 'docs/tor.md')
| -rw-r--r-- | docs/tor.md | 39 |
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 | ||
| 103 | The legacy P2P listener still binds to port `8433`. You can expose it through | 105 | The legacy P2P listener still binds to port `8433`. You can expose it through |
| 104 | Tor manually: | 106 | Tor manually: |
| @@ -108,6 +110,35 @@ HiddenServiceDir /var/lib/tor/bitflash-node/ | |||
| 108 | HiddenServicePort 8433 127.0.0.1:8433 | 110 | HiddenServicePort 8433 127.0.0.1:8433 |
| 109 | ``` | 111 | ``` |
| 110 | 112 | ||
| 111 | Current automatic peer discovery is `.btf`/rendezvous based, not onion-address | 113 | After restarting Tor, read the generated onion name: |
| 112 | gossip. Treat direct full-node onion access as an operator/admin tool unless a | 114 | |
| 113 | future release adds first-class onion peer advertisements. | 115 | ```bash |
| 116 | sudo cat /var/lib/tor/bitflash-node/hostname | ||
| 117 | ``` | ||
| 118 | |||
| 119 | Then start Bitflash with Tor outbound enabled and advertise that hidden service: | ||
| 120 | |||
| 121 | ```bash | ||
| 122 | bitflash -tor \ | ||
| 123 | -onionservice=exampleexampleexampleexampleexampleexampleexampleexample.onion:8433 | ||
| 124 | ``` | ||
| 125 | |||
| 126 | That onion endpoint is signed into this node's self-certifying `.btf` | ||
| 127 | descriptor. New peers that resolve the descriptor and also run with `-tor` try | ||
| 128 | the `.onion:8433` P2P connection first. If it fails, they fall back to the | ||
| 129 | ordinary encrypted rendezvous path. Older nodes ignore the onion field and still | ||
| 130 | use the rendezvous relay because the descriptor keeps the legacy signature too. | ||
| 131 | |||
| 132 | If the node has `-onionservice` but has not registered at any rendezvous relay | ||
| 133 | yet, it can still publish an onion-capable descriptor with | ||
| 134 | `meeting_node = rendezvous-pending`. Tor-capable peers can dial the hidden | ||
| 135 | service directly from that descriptor. Rendezvous becomes a fallback, not a | ||
| 136 | precondition for being discoverable. | ||
| 137 | |||
| 138 | 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, | ||
| 140 | but an already-discovered onion-capable peer can be reached directly over Tor. | ||
| 141 | |||
| 142 | The node does not create or rotate Tor hidden services itself. Tor owns the | ||
| 143 | private key under `HiddenServiceDir`; back it up if you want the onion name to | ||
| 144 | stay stable. | ||