![]() |
Bitcoin Core 29.99.0
P2P Digital Currency
|
Generate unique credentials for Tor stream isolation. More...
Public Member Functions | |
TorStreamIsolationCredentialsGenerator () | |
ProxyCredentials | Generate () |
Return the next unique proxy credentials. More... | |
Static Public Attributes | |
static constexpr size_t | PREFIX_BYTE_LENGTH = 8 |
Size of session prefix in bytes. More... | |
Static Private Member Functions | |
static std::string | GenerateUniquePrefix () |
Generate a random prefix for each of the credentials returned by this generator. More... | |
Private Attributes | |
const std::string | m_prefix |
std::atomic< uint64_t > | m_counter |
Generate unique credentials for Tor stream isolation.
Tor will create separate circuits for SOCKS5 proxy connections with different credentials, which makes it harder to correlate the connections.
Definition at line 757 of file netbase.cpp.
|
inline |
Definition at line 760 of file netbase.cpp.
|
inline |
Return the next unique proxy credentials.
Definition at line 765 of file netbase.cpp.
|
inlinestaticprivate |
Generate a random prefix for each of the credentials returned by this generator.
This makes sure that different launches of the application (either successively or in parallel) will not share the same circuits, as would be the case with a bare counter.
Definition at line 782 of file netbase.cpp.
|
private |
Definition at line 776 of file netbase.cpp.
|
private |
Definition at line 775 of file netbase.cpp.
|
staticconstexpr |
Size of session prefix in bytes.
Definition at line 773 of file netbase.cpp.