upleb.uk

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

summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbitflash-maintainer <noreply@bitflash.invalid>2026-08-26 22:46:22 +0000
committerbitflash-maintainer <noreply@bitflash.invalid>2026-08-26 22:46:22 +0000
commita1d867ecbcfc9e218408d0a11863a450243a01f9 (patch)
tree346b6e57fa6582c69c605f145d15d63cf8696222 /src
parent72242aadd602ee68c9a052386cfbd342b75a1977 (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.
Diffstat (limited to 'src')
-rw-r--r--src/main_gui.cpp11
1 files changed, 10 insertions, 1 deletions
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()))