Crates.io | tor-socksproto |
lib.rs | tor-socksproto |
version | 0.25.0 |
source | src |
created_at | 2021-06-24 14:03:33.347959 |
updated_at | 2024-12-02 18:00:13.121632 |
description | Encode and decode the SOCKS protocol, as extended in Tor |
homepage | https://gitlab.torproject.org/tpo/core/arti/-/wikis/home |
repository | https://gitlab.torproject.org/tpo/core/arti.git/ |
max_upload_size | |
id | 414466 |
size | 95,735 |
Implements SOCKS in the flavors provided by Tor.
SOCKS is an old and somewhat janky protocol for telling a TCP proxy where to connect. Versions 4, 4a, and 5 are sometimes encountered in the wild.
The tor-socksproto
crate tries to hide the actual details of the
protocol, and expose a stateful handshake type that eventually
provides a [SocksRequest
] or an error. It is part of
Arti, a project to
implement Tor in Rust.
At present, it is only used to provide a
SOCKS proxy over the Tor network, but eventually it may be used
to implement support for connecting to the Tor network over a
SOCKS proxy.
This crate may be a good choice for you if you need a SOCKS implementation that "behaves like Tor", but otherwise it is probably better to use some other SOCKS crate.
For more information about SOCKS:
Arti uses this crate instead of some other SOCKS implementation, for two reasons:
Currently, tor-socksproto
does no networking code: it only
implements the server (proxy) side of the SOCKS handshake by
handling a series of bytes. We may (or may not) want to add
network functionality to this crate or elsewhere in the future.
We'll definitely want to add client functionality.
Possibly, this approach will prove useful for other uses. If it does, We can put the tor-only functionality behind a Cargo build feature, so that others can use this crate more safely.
License: MIT OR Apache-2.0