![]() |
Bitcoin Core 30.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 753 of file netbase.cpp.
|
inline |
Definition at line 756 of file netbase.cpp.
|
inline |
Return the next unique proxy credentials.
Definition at line 761 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 778 of file netbase.cpp.
|
private |
Definition at line 772 of file netbase.cpp.
|
private |
Definition at line 771 of file netbase.cpp.
|
staticconstexpr |
Size of session prefix in bytes.
Definition at line 769 of file netbase.cpp.