Skip to main content

Module connect

Module connect 

Source
Available on crate feature http only.
Expand description

I/O-free coroutine running the HTTP CONNECT tunnel handshake (RFC 9110 §9.3.6).

Sends CONNECT host:port HTTP/1.1 in authority-form and treats any 2xx response as a live tunnel. The response head is read one byte at a time up to the blank-line terminator, so no tunnel payload (a TLS ServerHello, an IMAP/SMTP greeting) past the head is ever consumed: the socket is left positioned exactly at the tunnel start.

Only tunnelling is implemented; plaintext HTTP forward proxying (absolute-URI request lines) and non-Basic proxy authentication (Digest, NTLM, Negotiate) are out of scope.

Structs§

HttpConnect
I/O-free HTTP CONNECT handshake coroutine.
HttpCredentials
Proxy-Authorization: Basic credentials (RFC 7617).

Enums§

HttpConnectError
Failure causes during the HTTP CONNECT handshake.