From a1d867ecbcfc9e218408d0a11863a450243a01f9 Mon Sep 17 00:00:00 2001 From: bitflash-maintainer Date: Wed, 26 Aug 2026 22:46:22 +0000 Subject: 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. --- src/main_gui.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'src/main_gui.cpp') 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() printf(" /socks=HOST:PORT (SOCKS5 proxy for Nostr, .btf relay, and onion dials)\n"); printf(" /tor[=HOST:PORT] (Tor mode; default SOCKS5 proxy is 127.0.0.1:9050)\n"); printf(" /managedtor[=PATH] (start Tor, create a hidden service, advertise its onion)\n"); + printf(" /automanagedtor (auto-start a bundled Tor if one sits next to the executable)\n"); printf(" /nomanagedtor (disable automatic bundled Tor startup)\n"); printf(" /oniononly (do not fall back to rendezvous when a .btf onion dial fails)\n"); printf(" /btfseed=ADDRESS:ENCHEX (extra bootstrap peer, repeatable)\n"); @@ -360,8 +361,16 @@ static void ParseStartupArguments(int argc, char* argv[]) bool fTorMode = arg(argc, argv, "/tor") || arg(argc, argv, "-tor"); string socksProxy = argval2(argc, argv, "/socks", "-socks"); string bundledTorPath; + // Managed Tor is opt-in on this fork. Upstream 1.2.19 auto-starts a + // bundled tor whenever one sits next to the executable, which silently + // moves Nostr/.btf traffic onto Tor, creates a hidden service, and starts + // publishing descriptors with meeting_node="rendezvous-pending" on nodes + // that never asked for it -- against our pinned-relay posture. The + // upstream behavior remains available under the explicit /automanagedtor. bool fAutoManagedTor = !fManagedTor && !fNoManagedTor && !fTorMode && - socksProxy.empty() && BtfBundledTorPath(bundledTorPath); + socksProxy.empty() && + (arg(argc, argv, "/automanagedtor") || arg(argc, argv, "-automanagedtor")) && + BtfBundledTorPath(bundledTorPath); if (fManagedTor || fAutoManagedTor) { if (fManagedTor && (fTorMode || !socksProxy.empty())) -- cgit v1.2.3