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:
Diffstat (limited to 'docs')
-rw-r--r--docs/tor.md84
1 files changed, 84 insertions, 0 deletions
diff --git a/docs/tor.md b/docs/tor.md
new file mode 100644
index 0000000..087c822
--- /dev/null
+++ b/docs/tor.md
@@ -0,0 +1,84 @@
1# Tor mode
2
3Bitflash can route outbound discovery traffic through a local Tor SOCKS5 proxy.
4This is transport plumbing only: it does not change consensus, wallet keys,
5mining, `.btf` addresses, or the encrypted rendezvous protocol.
6
7## Client mode
8
9Start Tor locally, then start Bitflash with:
10
11```bash
12bitflash -tor
13```
14
15`-tor` is shorthand for:
16
17```bash
18bitflash -socks=127.0.0.1:9050
19```
20
21If Tor listens somewhere else:
22
23```bash
24bitflash -tor=127.0.0.1:9150
25bitflash -tor=[::1]:9050
26```
27
28When Tor mode is enabled:
29
30- outbound Nostr relay dials use Tor;
31- outbound `.btf` rendezvous relay dials use Tor;
32- destination names are sent to Tor as SOCKS5 domain-name CONNECT requests, so
33 the local DNS resolver does not see them;
34- direct `.onion` dials are refused unless a SOCKS5/Tor proxy is enabled;
35- plain HTTP external-IP probes are skipped.
36
37## Onion rendezvous relay
38
39An operator can expose a Bitflash rendezvous relay as a Tor hidden service. The
40node does not create hidden services itself; Tor owns that configuration.
41
42Example `torrc`:
43
44```text
45HiddenServiceDir /var/lib/tor/bitflash-rendezvous/
46HiddenServicePort 8434 127.0.0.1:8434
47```
48
49After restarting Tor, read the generated onion name:
50
51```bash
52sudo cat /var/lib/tor/bitflash-rendezvous/hostname
53```
54
55Then run the relay on localhost/VPS as usual and announce the onion endpoint from
56nodes that use Tor:
57
58```bash
59bitflash -tor -rvrelay=exampleexampleexampleexampleexampleexampleexampleexample.onion:8434
60bitflash -tor -announcerelay=exampleexampleexampleexampleexampleexampleexampleexample.onion:8434
61```
62
63For a pool operator that wants the pool descriptor to point at an onion
64rendezvous relay, use both:
65
66```bash
67bitflash -operator -tor \
68 -rvrelay=exampleexampleexampleexampleexampleexampleexampleexample.onion:8434 \
69 -announcerelay=exampleexampleexampleexampleexampleexampleexampleexample.onion:8434
70```
71
72## Full-node hidden service
73
74The legacy P2P listener still binds to port `8433`. You can expose it through
75Tor manually:
76
77```text
78HiddenServiceDir /var/lib/tor/bitflash-node/
79HiddenServicePort 8433 127.0.0.1:8433
80```
81
82Current automatic peer discovery is `.btf`/rendezvous based, not onion-address
83gossip. Treat direct full-node onion access as an operator/admin tool unless a
84future release adds first-class onion peer advertisements.