Crate fast_socks5
source ·Expand description
Fast SOCKS5 client/server implementation written in Rust async/.await (with tokio).
This library is maintained by anyip.io a residential and mobile socks5 proxy provider.
§Features
- An
async
/.await
SOCKS5 implementation. - An
async
/.await
SOCKS4 Client implementation. - An
async
/.await
SOCKS4a Client implementation. - No unsafe code
- Built on-top of
tokio
library - Ultra lightweight and scalable
- No system dependencies
- Cross-platform
- Authentication methods:
- No-Auth method
- Username/Password auth method
- Custom auth methods can be implemented via the Authentication Trait
- Credentials returned on authentication success
- All SOCKS5 RFC errors (replies) should be mapped
AsyncRead + AsyncWrite
traits are implemented on Socks5Stream & Socks5SocketIPv4
,IPv6
, andDomains
types are supported- Config helper for Socks5Server
- Helpers to run a Socks5Server à la “std’s TcpStream” via
incoming.next().await
- Examples come with real cases commands scenarios
- Can disable
DNS resolving
- Can skip the authentication/handshake process, which will directly handle command’s request (useful to save useless round-trips in a current authenticated environment)
- Can disable command execution (useful if you just want to forward the request to a different server)
§Install
Open in crates.io.
§Examples
Please check examples
directory.
Modules§
Macros§
- Easy to destructure bytes buffers by naming each fields:
Enums§
- SOCKS5 reply code
Functions§
- Generate UDP header
- Parse data from UDP client on raw buffer, return (frag, target_addr, payload).