Merge bitcoin/bitcoin#32176: net: Prevent accidental circuit sharing when using Tor stream isolation
ec81a72b36net: Add randomized prefix to Tor stream isolation credentials (laanwj)c47f81e8acnet: Rename `_randomize_credentials` Proxy parameter to `tor_stream_isolation` (laanwj) Pull request description: Add a class TorsStreamIsolationCredentialsGenerator that generates unique credentials based on a randomly generated session prefix and an atomic counter. Use this in `ConnectThroughProxy` instead of a simple atomic int counter. This makes sure that different launches of the application won't share the same credentials, and thus circuits, even in edge cases. Example with `-debug=proxy`: ``` 2025-03-31T16:30:27Z [proxy] SOCKS5 sending proxy authentication 0afb2da441f5c105-0:0afb2da441f5c105-0 2025-03-31T16:30:31Z [proxy] SOCKS5 sending proxy authentication 0afb2da441f5c105-1:0afb2da441f5c105-1 ``` Thanks to hodlinator in https://github.com/bitcoin/bitcoin/pull/32166#discussion_r2020973352 for the idea. ACKs for top commit: hodlinator: re-ACKec81a72b36jonatack: ACKec81a72b36danielabrozzoni: tACKec81a72b36Tree-SHA512: 195f5885fade77545977b91bdc41394234ae575679cb61631341df443fd8482cd74650104e323c7dbfff7826b10ad61692cca1284d6810f84500a3488f46597a
This commit is contained in:
8 files changed
+55
-19
No files matched your search
@@ -482,7 +482,7 @@ QValidator::State ProxyAddressValidator::validate(QString &input, int &pos) cons
|
||||
if (!SplitHostPort(input.toStdString(), port, hostname) || port != 0) return QValidator::Invalid;
|
||||
|
||||
CService serv(LookupNumeric(input.toStdString(), DEFAULT_GUI_PROXY_PORT));
|
||||
Proxy addrProxy = Proxy(serv, true);
|
||||
Proxy addrProxy = Proxy(serv, /*tor_stream_isolation=*/true);
|
||||
if (addrProxy.IsValid())
|
||||
return QValidator::Acceptable;
|
||||
|
||||
|
||||
Reference in new issue
Block a user