pub async fn http_accept<T>(
stream: &mut T,
auth_method: &AuthMethod,
) -> Result<Address>Available on crate feature
http only.Expand description
Accepts an HTTP proxy connection request from a client.
This function reads and processes an HTTP CONNECT request from the client, validates authentication if required, and extracts the target address.
§Arguments
stream- A mutable reference to an asynchronous stream implementingAsyncRead+Unpin.auth_method- The authentication method required for this connection.
§Returns
Result<Address>- The parsed target address on success, or an error if the request is invalid, authentication fails, or the connection cannot be established.