Function arti::socks::handle_socks_conn

source ·
async fn handle_socks_conn<R, S>(
    runtime: R,
    context: SocksConnContext<R>,
    socks_stream: 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 SOCKS port, handle the SOCKS 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 socks request.