10#ifndef PROTO_FUZZER_SOCKS4_MOCK_SERVER_H_
11#define PROTO_FUZZER_SOCKS4_MOCK_SERVER_H_
20namespace proto_fuzzer {
38 void Install(CURL* easy)
override;
52 static constexpr std::size_t kMaxTranscriptBytes = 64 * 1024;
54 curl::fuzzer::proto::SocksProxyMode mode_;
55 bool haproxy_protocol_;
56 std::string client_transcript_;
Receives bytes after any transport decoding.
MockServer(MultiDrivePolicy drive_policy=MultiDrivePolicy::kPerform)
Construct an idle MockServer with no scripted responses or open peers.
const std::string & client_transcript() const
bool SupportsRepeatedPollsetProbe() const override
void ObserveState() override
Retain protocol outcomes in coverage and introspector builds.
void ObserveIncomingData(const unsigned char *data, std::size_t size) override
Retain a bounded prefix of client bytes for strict integration tests.
ProxyTransportMockServer(curl::fuzzer::proto::SocksProxyMode mode, bool haproxy_protocol)
Select a fixed SOCKS wire version, resolution side, and optional HAProxy prefix.
void Install(CURL *easy) override
Install common socket callbacks and the fixed SOCKS proxy policy.
std::unique_ptr< MockConnection > CreateConnection() override
Create one socketpair peer and attach the raw-byte transcript observer.
Optional observer for application bytes consumed by mock peers.
MockConnection and MockServer — the in-process peer that feeds canned response bytes to libcurl over ...