25 static const auto testing_setup = MakeNoLogFileContext<const BasicTestingSetup>();
33 proxy_credentials.
username = fuzzed_data_provider.ConsumeRandomLengthString(512);
34 proxy_credentials.
password = fuzzed_data_provider.ConsumeRandomLengthString(512);
35 if (fuzzed_data_provider.ConsumeBool()) {
40 g_socks5_recv_timeout = (fuzzed_data_provider.ConsumeBool() && std::getenv(
"FUZZED_SOCKET_FAKE_LATENCY") !=
nullptr) ? 1ms : default_socks5_recv_timeout;
44 auto str_dest = fuzzed_data_provider.ConsumeRandomLengthString(512);
45 auto port = fuzzed_data_provider.ConsumeIntegral<uint16_t>();
46 auto* auth = fuzzed_data_provider.ConsumeBool() ? &proxy_credentials :
nullptr;
47 (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)