Expand description
A lightweight SOCKS5 proxy library
§SOCKS5 Implementation
- Features:
- CONNECT
- UDP ASSOCIATE
- No Authentication
- Username/Passowrd Authentication
- Async using tokio and channel-based communication
- Stateful tracking of client-target associations
- Dedicated socket per client-target pair -> minimizes NAT and client identification issues
- Time-out based socket cleanup
- SOCKS5 (RFC 1928)
- Username/Password Authentication (RFC 1929)
§Example
use soxide::{Socks5Server, auth::UserPass};
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let server = Socks5Server::new("127.0.0.1:1080");
server.run().await?;
Ok(())
}Re-exports§
pub use auth::UserPass;pub use protocol::AuthMethod;pub use protocol::Command;pub use protocol::ReplyCode;pub use protocol::Version;pub use server::Socks5Server;pub use commands::TransportProtocol;