Expand description
SOCKS-specific proxy support.
Re-exportsΒ§
use futures::io::AsyncRead;πuse futures::io::AsyncReadExt;πuse futures::io::AsyncWrite;πuse futures::io::BufReader;πuse safelog::sensitive;πuse std::net::IpAddr;πuse std::net::Ipv4Addr;πuse std::net::Ipv6Addr;πuse std::sync::Arc;πuse tracing::debug;πuse tracing::instrument;πuse tracing::instrument;πuse tracing::warn;πuse arti_client::HasKind;πuse arti_client::ErrorKind;πuse arti_client::IntoTorAddr as _;πuse arti_client::StreamPrefs;πuse tor_basic_utils::onionperf_types::OnionperfEvent;πuse tor_basic_utils::onionperf_types::OnionperfStreamStatus;πuse tor_rpcbase as rpc;πuse tor_rtcompat::Runtime;πuse tor_socksproto::Handshake as _;πuse tor_socksproto::SocksAddr;πuse tor_socksproto::SocksAuth;πuse tor_socksproto::SocksCmd;πuse tor_socksproto::SocksRequest;πuse anyhow::Context;πuse anyhow::Result;πuse anyhow::anyhow;πuse super::ListenerIsolation;πuse super::ProvidedIsolation;πuse super::ProxyContext;πuse super::StreamIsolationKey;πuse super::write_all_and_close;πuse super::write_all_and_flush;πuse crate::rpc::conntarget::ConnTarget;π
StructsΒ§
- Auth
Interpretation π - The meaning of a SOCKS authentication field, according to our conventions.
ConstantsΒ§
- WRONG_
PROTOCOL_ πPAYLOAD - Payload to return when an HTTP connection arrive on a Socks port without HTTP support.
FunctionsΒ§
- handle_
socks_ πconn - Given a just-received TCP connection
Son a SOCKS port, handle the SOCKS handshake and relay the connection over the Tor network. - interpret_
socks_ πauth - Given the authentication object from a socks connection, determine what itβs telling us to do.
- reply_
error π - Reply a Socks error based on an arti-client Error and close the stream. Returns the error provided in parameter
- stream_
preference - Find out which kind of address family we can/should use for a
given
SocksRequest.