pub async fn http_connect(
stream: BoxStream,
target: &TargetAddr,
auth: Option<(&str, &str)>,
limits: &HttpConnectLimits,
) -> Result<BoxStream, HttpError>Expand description
Send an HTTP CONNECT request to an upstream proxy and return the upgraded stream on success.
§Arguments
stream- The stream to the upstream proxytarget- The target address to connect toauth- Optional (username, password) for Proxy-Authorizationlimits- Parsing limits for the response
§Returns
The stream after receiving a 2xx response, ready for bidirectional forwarding.