10#ifndef PROTO_FUZZER_H2_PROXY_MOCK_SERVER_H_
11#define PROTO_FUZZER_H2_PROXY_MOCK_SERVER_H_
15namespace proto_fuzzer {
33 curl::fuzzer::proto::ProxyProtocol protocol = curl::fuzzer::proto::PROXY_PROTOCOL_HTTP2);
39 void Install(CURL* easy)
override;
47 void ObserveIncomingData(
const unsigned char* data, std::size_t size)
override;
50 curl::fuzzer::proto::ProxyProtocol protocol_;
51 std::string client_transcript_;
H2ProxyMockServer(H2ProxyMode mode=H2ProxyMode::kTunnel, curl::fuzzer::proto::ProxyProtocol protocol=curl::fuzzer::proto::PROXY_PROTOCOL_HTTP2)
Select the closed proxy protocol profile before any connection opens.
void Install(CURL *easy) override
Install the socket transport and force one verified HTTPS proxy.
const std::string & client_transcript() const
std::unique_ptr< MockConnection > CreateConnection() override
Attach a bounded observer after TLS decoding so tests can verify the real CONNECT request rather than...
Receives bytes after any transport decoding.
TlsMockServer()
Build one reusable in-process server context per fuzz iteration.
H2ProxyMode
Origin-request shape carried by the fixed HTTPS/HTTP2 proxy transport.
@ kForward
Submit an absolute-form origin request directly as an HTTP/2 stream.
@ kTunnel
Establish CONNECT, then carry a plaintext HTTP/1.1 origin exchange.
Reusable TLS transport for structured in-process protocol peers.