pingora_core::protocols::raw_connect

Function connect

Source
pub async fn connect(
    stream: Stream,
    request_header: &Parts,
) -> Result<(Stream, ProxyDigest)>
Expand description

Try to establish a CONNECT proxy via the given stream.

request_header should include the necessary request headers for the CONNECT protocol.

When successful, a Stream will be returned which is the established CONNECT proxy connection.