Skip to main content

handle_http_conn

Function handle_http_conn 

Source
pub(super) async fn handle_http_conn<R, S>(
    context: ProxyContext<R>,
    stream: BufReader<S>,
    isolation_info: (usize, IpAddr),
) -> Result<()>
where R: Runtime, S: AsyncRead + AsyncWrite + Send + Sync + Unpin + 'static,
Expand description

Given a just-received TCP connection S on a HTTP proxy port, handle the HTTP handshake and relay the connection over the Tor network.

Uses isolation_info to decide which circuits this connection may use. Requires that isolation_info is a pair listing the listener id and the source address for the HTTP request.