diff options
| author | bitflash-maintainer <noreply@bitflash.invalid> | 2026-08-26 22:46:22 +0000 |
|---|---|---|
| committer | bitflash-maintainer <noreply@bitflash.invalid> | 2026-08-26 22:46:22 +0000 |
| commit | a1d867ecbcfc9e218408d0a11863a450243a01f9 (patch) | |
| tree | 346b6e57fa6582c69c605f145d15d63cf8696222 | |
| parent | 72242aadd602ee68c9a052386cfbd342b75a1977 (diff) | |
build: make managed Tor opt-in, and ignore upstream's committed build artifacts
Upstream 1.2.19 auto-starts a bundled tor whenever one sits next to the
executable: silent transport change, a spawned process, a new hidden service,
and descriptors going out with meeting_node="rendezvous-pending" -- on nodes
that never asked, against this fork's pinned-relay posture. The behavior moves
behind the explicit /automanagedtor; /managedtor stays as before.
Also ignore build-*.log, __pycache__/ and *.pyc so the five artifacts stripped
from the release merge cannot come back.
| -rw-r--r-- | .gitignore | 5 | ||||
| -rw-r--r-- | src/main_gui.cpp | 11 |
2 files changed, 15 insertions, 1 deletions
| @@ -20,11 +20,16 @@ SHA256SUMS.asc | |||
| 20 | # Runtime data / logs | 20 | # Runtime data / logs |
| 21 | debug.log | 21 | debug.log |
| 22 | db.log | 22 | db.log |
| 23 | build-*.log | ||
| 23 | *.dat | 24 | *.dat |
| 24 | wallet.dat | 25 | wallet.dat |
| 25 | nostr.key | 26 | nostr.key |
| 26 | btf_enc.key | 27 | btf_enc.key |
| 27 | 28 | ||
| 29 | # Python cache (upstream's release commit accidentally shipped one) | ||
| 30 | __pycache__/ | ||
| 31 | *.pyc | ||
| 32 | |||
| 28 | # Third-party build trees (rebuilt by the build scripts) | 33 | # Third-party build trees (rebuilt by the build scripts) |
| 29 | RandomX/ | 34 | RandomX/ |
| 30 | deps/ | 35 | deps/ |
diff --git a/src/main_gui.cpp b/src/main_gui.cpp index e8dacd3..211e1e2 100644 --- a/src/main_gui.cpp +++ b/src/main_gui.cpp | |||
| @@ -146,6 +146,7 @@ static void PrintUsage() | |||
| 146 | printf(" /socks=HOST:PORT (SOCKS5 proxy for Nostr, .btf relay, and onion dials)\n"); | 146 | printf(" /socks=HOST:PORT (SOCKS5 proxy for Nostr, .btf relay, and onion dials)\n"); |
| 147 | printf(" /tor[=HOST:PORT] (Tor mode; default SOCKS5 proxy is 127.0.0.1:9050)\n"); | 147 | printf(" /tor[=HOST:PORT] (Tor mode; default SOCKS5 proxy is 127.0.0.1:9050)\n"); |
| 148 | printf(" /managedtor[=PATH] (start Tor, create a hidden service, advertise its onion)\n"); | 148 | printf(" /managedtor[=PATH] (start Tor, create a hidden service, advertise its onion)\n"); |
| 149 | printf(" /automanagedtor (auto-start a bundled Tor if one sits next to the executable)\n"); | ||
| 149 | printf(" /nomanagedtor (disable automatic bundled Tor startup)\n"); | 150 | printf(" /nomanagedtor (disable automatic bundled Tor startup)\n"); |
| 150 | printf(" /oniononly (do not fall back to rendezvous when a .btf onion dial fails)\n"); | 151 | printf(" /oniononly (do not fall back to rendezvous when a .btf onion dial fails)\n"); |
| 151 | printf(" /btfseed=ADDRESS:ENCHEX (extra bootstrap peer, repeatable)\n"); | 152 | printf(" /btfseed=ADDRESS:ENCHEX (extra bootstrap peer, repeatable)\n"); |
| @@ -360,8 +361,16 @@ static void ParseStartupArguments(int argc, char* argv[]) | |||
| 360 | bool fTorMode = arg(argc, argv, "/tor") || arg(argc, argv, "-tor"); | 361 | bool fTorMode = arg(argc, argv, "/tor") || arg(argc, argv, "-tor"); |
| 361 | string socksProxy = argval2(argc, argv, "/socks", "-socks"); | 362 | string socksProxy = argval2(argc, argv, "/socks", "-socks"); |
| 362 | string bundledTorPath; | 363 | string bundledTorPath; |
| 364 | // Managed Tor is opt-in on this fork. Upstream 1.2.19 auto-starts a | ||
| 365 | // bundled tor whenever one sits next to the executable, which silently | ||
| 366 | // moves Nostr/.btf traffic onto Tor, creates a hidden service, and starts | ||
| 367 | // publishing descriptors with meeting_node="rendezvous-pending" on nodes | ||
| 368 | // that never asked for it -- against our pinned-relay posture. The | ||
| 369 | // upstream behavior remains available under the explicit /automanagedtor. | ||
| 363 | bool fAutoManagedTor = !fManagedTor && !fNoManagedTor && !fTorMode && | 370 | bool fAutoManagedTor = !fManagedTor && !fNoManagedTor && !fTorMode && |
| 364 | socksProxy.empty() && BtfBundledTorPath(bundledTorPath); | 371 | socksProxy.empty() && |
| 372 | (arg(argc, argv, "/automanagedtor") || arg(argc, argv, "-automanagedtor")) && | ||
| 373 | BtfBundledTorPath(bundledTorPath); | ||
| 365 | if (fManagedTor || fAutoManagedTor) | 374 | if (fManagedTor || fAutoManagedTor) |
| 366 | { | 375 | { |
| 367 | if (fManagedTor && (fTorMode || !socksProxy.empty())) | 376 | if (fManagedTor && (fTorMode || !socksProxy.empty())) |