![]() |
Bitcoin Core 31.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 755 of file netbase.cpp.
|
inline |
Definition at line 758 of file netbase.cpp.
|
inline |
Return the next unique proxy credentials.
Definition at line 763 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 780 of file netbase.cpp.
|
private |
Definition at line 774 of file netbase.cpp.
|
private |
Definition at line 773 of file netbase.cpp.
|
staticconstexpr |
Size of session prefix in bytes.
Definition at line 771 of file netbase.cpp.