Skip to main content

handle_socks_conn

Function handle_socks_conn 

Source
pub(super) async fn handle_socks_conn<R, S>(
    context: ProxyContext<R>,
    socks_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 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.