From feeafbfdce8b60b676ef58a0a856f09d14da8bee Mon Sep 17 00:00:00 2001 From: jwinterm Date: Thu, 18 Jun 2026 20:34:14 -0400 Subject: [PATCH] =?UTF-8?q?wowlet:=20broadcast=20txs=20over=20Tor=20via=20?= =?UTF-8?q?wownerod=20--tx-proxy=20(gated=20on=20HAS=5FTOR=5FBIN;=20Config?= =?UTF-8?q?::broadcastOverTor=20default=20on)=20=E2=80=94=20hides=20tx=20o?= =?UTF-8?q?rigin=20IP,=20complements=20embedded-node=20receive=20privacy;?= =?UTF-8?q?=20activates=20when=20Tor=20is=20bundled=20(depends=20build)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/DaemonManager.cpp | 14 ++++++++++++++ src/utils/config.cpp | 1 + src/utils/config.h | 1 + 3 files changed, 16 insertions(+) diff --git a/src/utils/DaemonManager.cpp b/src/utils/DaemonManager.cpp index ae29c025..2a95ef5f 100644 --- a/src/utils/DaemonManager.cpp +++ b/src/utils/DaemonManager.cpp @@ -77,6 +77,20 @@ void DaemonManager::start() { if (conf()->get(Config::pruneBlockchain).toBool()) arguments << "--prune-blockchain"; + // wowlet: broadcast our OWN txs through Tor — hides the originating IP (the embedded node already + // gives us scan/receive privacy; this closes the send side). Sync stays on clearnet for speed. + // wownerod queues local txs until the proxy is reachable, so it tolerates Tor still bootstrapping. + // Only when Tor is actually bundled (HAS_TOR_BIN) — --tx-proxy is exclusive, so without a running + // Tor it would silently stall broadcasts. Builds without embedded Tor fall back to clearnet relay. +#if defined(HAS_TOR_BIN) + if (conf()->get(Config::broadcastOverTor).toBool()) { + quint16 torPort = conf()->get(Config::useLocalTor).toBool() + ? conf()->get(Config::socks5Port).toString().toUShort() + : conf()->get(Config::torManagedPort).toString().toUShort(); + arguments << "--tx-proxy" << QString("tor,127.0.0.1:%1,16").arg(torPort); + } +#endif + qDebug() << QString("Starting wownerod: %1 %2").arg(this->daemonPath, arguments.join(" ")); m_process->start(this->daemonPath, arguments); diff --git a/src/utils/config.cpp b/src/utils/config.cpp index 9c2b89bc..8a2925bc 100644 --- a/src/utils/config.cpp +++ b/src/utils/config.cpp @@ -68,6 +68,7 @@ static const QHash configStrings = { {Config::runLocalNode,{QS("runLocalNode"), true}}, // wowlet: run own node by default {Config::pruneBlockchain,{QS("pruneBlockchain"), false}}, // full archival by default {Config::wownerodPath,{QS("wownerodPath"), ""}}, // optional override; bundled by default + {Config::broadcastOverTor,{QS("broadcastOverTor"), true}},// wowlet: --tx-proxy our txs through Tor (hide originating IP) {Config::amountPrecision, {QS("amountPrecision"), 12}}, {Config::dateFormat, {QS("dateFormat"), "yyyy-MM-dd"}}, {Config::timeFormat, {QS("timeFormat"), "HH:mm"}}, diff --git a/src/utils/config.h b/src/utils/config.h index 191dbd73..2cba3f83 100644 --- a/src/utils/config.h +++ b/src/utils/config.h @@ -76,6 +76,7 @@ public: runLocalNode, pruneBlockchain, wownerodPath, + broadcastOverTor, // Network -> Proxy proxy,