From 8e4a0ddd5084ba5bb4613f422b3ff044d0da3927 Mon Sep 17 00:00:00 2001 From: Eval EXEC Date: Mon, 3 Mar 2025 23:26:04 +0800 Subject: [PATCH] torcontrol: Add comment explaining Proxy credential randomization for Tor privacy Signed-off-by: Eval EXEC --- src/torcontrol.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/torcontrol.cpp b/src/torcontrol.cpp index f2855b10935..5b8f5c74fe1 100644 --- a/src/torcontrol.cpp +++ b/src/torcontrol.cpp @@ -403,7 +403,11 @@ void TorController::get_socks_cb(TorControlConnection& _conn, const TorControlRe Assume(resolved.IsValid()); LogDebug(BCLog::TOR, "Configuring onion proxy for %s\n", resolved.ToStringAddrPort()); - Proxy addrOnion = Proxy(resolved, true); + + // With m_randomize_credentials = true, generates unique SOCKS credentials per proxy connection (e.g., Tor). + // Prevents connection correlation and enhances privacy by forcing different Tor circuits. + // Requires Tor's IsolateSOCKSAuth (default enabled) for effective isolation (see IsolateSOCKSAuth section in https://2019.www.torproject.org/docs/tor-manual.html.en). + Proxy addrOnion = Proxy(resolved, /*_randomize_credentials=*/ true); SetProxy(NET_ONION, addrOnion); const auto onlynets = gArgs.GetArgs("-onlynet");