26 static const auto testing_setup = MakeNoLogFileContext<const BasicTestingSetup>();
35 proxy_credentials.
username = fuzzed_data_provider.ConsumeRandomLengthString(512);
36 proxy_credentials.
password = fuzzed_data_provider.ConsumeRandomLengthString(512);
37 if (fuzzed_data_provider.ConsumeBool()) {
42 g_socks5_recv_timeout = (fuzzed_data_provider.ConsumeBool() && std::getenv(
"FUZZED_SOCKET_FAKE_LATENCY") !=
nullptr) ? 1ms : default_socks5_recv_timeout;
46 auto str_dest = fuzzed_data_provider.ConsumeRandomLengthString(512);
47 auto port = fuzzed_data_provider.ConsumeIntegral<uint16_t>();
48 auto* auth = fuzzed_data_provider.ConsumeBool() ? &proxy_credentials :
nullptr;
49 (void)
Socks5(str_dest, port, auth, fuzzed_sock);
CThreadInterrupt g_socks5_interrupt
Interrupt SOCKS5 reads or writes.
bool Socks5(const std::string &strDest, uint16_t port, const ProxyCredentials *auth, const Sock &sock)
Connect to a specified destination service through an already connected SOCKS5 proxy.
std::chrono::milliseconds g_socks5_recv_timeout
FUZZ_TARGET(socks5,.init=initialize_socks5)
Credentials for proxy authentication.
FuzzedSock ConsumeSock(FuzzedDataProvider &fuzzed_data_provider)
int64_t ConsumeTime(FuzzedDataProvider &fuzzed_data_provider, const std::optional< int64_t > &min, const std::optional< int64_t > &max) noexcept
void SetMockTime(int64_t nMockTimeIn)
DEPRECATED Use SetMockTime with chrono type.