Skip to main content

connect_via_http_proxy

Function connect_via_http_proxy 

Source
pub async fn connect_via_http_proxy(
    proxy: &str,
    host: &str,
    port: u16,
) -> Result<TcpStream>
Expand description

Establishes a TCP tunnel via an HTTP CONNECT proxy (RFC 7231 §4.3.6).

The returned TcpStream is an end-to-end tunnel — all subsequent reads and writes go directly to the target host through the proxy.