A lightweight SOCKS5 proxy server written in Rust with username/password authentication support.
- SOCKS5 protocol implementation (RFC 1928)
- Username/password authentication (RFC 1929)
- CONNECT command support for TCP proxying
- IPv4, IPv6, and domain name addressing
- Async I/O with Tokio for high performance
- Configurable bind address and port
bash <(curl -Ls https://s.ee/socks5)This will open an interactive menu to install and configure the server.
git clone https://github.com/missuo/s5-rust.git
cd s5-rust
cargo build --releaseThe binary will be available at target/release/s5-rust.
s5-rust --username <USERNAME> --password <PASSWORD> [OPTIONS]| Option | Short | Description | Default |
|---|---|---|---|
--username |
-u |
Username for authentication | Required |
--password |
-p |
Password for authentication | Required |
--port |
Port to listen on | 1080 |
|
--bind |
Address to bind to | 0.0.0.0 |
|
--send-through |
CIDR range for outbound source IP | None | |
--help |
-h |
Print help information |
Start the server with default settings:
s5-rust -u myuser -p mypasswordStart on a custom port:
s5-rust -u myuser -p mypassword --port 8080Bind to localhost only:
s5-rust -u myuser -p mypassword --bind 127.0.0.1 --port 1080Use a specific CIDR range for outbound connections (useful for servers with multiple IPs):
s5-rust -u myuser -p mypassword --send-through 2a06:a005:1c40::/48This will randomly select an IP from the specified CIDR range for each outbound connection.
curl --socks5 127.0.0.1:1080 --proxy-user myuser:mypassword http://httpbin.org/ipcurl --socks5-hostname 127.0.0.1:1080 --proxy-user myuser:mypassword https://httpbin.org/ipYou can also use the --proxy option with a SOCKS5 URL:
curl --proxy socks5h://myuser:mypassword@127.0.0.1:1080 http://httpbin.org/ipTo verify the outbound IPv6 address (useful when using --send-through):
curl --proxy socks5h://myuser:mypassword@your-server-ip:1080 http://ipv6.ip.sbConfigure your browser to use SOCKS5 proxy:
- Host:
127.0.0.1(or your server IP) - Port:
1080(or your configured port) - Username: your configured username
- Password: your configured password
Enable debug logging:
RUST_LOG=debug s5-rust -u myuser -p mypasswordMIT