Skip to main content

Module client

Module client 

Source
Available on crate feature client and (crate features http or socks5) only.
Expand description

Standard, blocking pump driving the proxy coroutines over any Read + Write stream.

On success the stream is a live tunnel to the target, positioned at its first byte, ready for the caller’s TLS handshake or plaintext protocol.

Enums§

ProxyClientError
Errors returned by the client pump.

Functions§

connect_httphttp
Runs the HTTP CONNECT handshake on stream (already connected to the proxy), tunnelling to host:port and sending Proxy-Authorization: Basic if credentials are provided.
connect_socks5socks5
Runs the SOCKS5 CONNECT handshake on stream (already connected to the proxy), tunnelling to target and authenticating with credentials if the proxy asks for username/password.