Expand description
SOCKS5 (RFC 1928) + username/password auth (RFC 1929) transport — the
anonymity seam for Tor (SOCKS5h :9050) and I2P (SOCKS :4444).
no_std, depends only on crate::platform + crate::error.
Two entry points, one codec: Socks5Client — a non-blocking handshake
state machine for every outbound peer; socks_http_get — a blocking
HTTP GET through the proxy (domain resolved by the proxy) for trackers.
When a proxy is configured the engine enforces: no inbound, no DHT, no UDP trackers, no port mapping, listen port 0.
Structs§
- Proxy
Config - SOCKS5 proxy configuration.
- Socks5
Client - Non-blocking SOCKS5 handshake state machine.
Enums§
- Socks
Status - Outcome of one
Socks5Client::pumpcall. - Socks
Target - Where a SOCKS5 CONNECT should reach.
Functions§
- socks_
http_ get - Perform a blocking HTTP GET to
urlthrough the SOCKS5 proxy. - socks_
http_ get_ range - Perform a blocking HTTP GET with a
Range: bytes=start-endheader through the SOCKS5 proxy. Used by web seeds (BEP-19) so piece data is never fetched from the real IP in proxy mode. The response body must be exactlyend - start + 1bytes, otherwiseErr(Protocol).