A Rust-based toolkit for reverse SOCKS4 proxying, including a relay server, SOCKS4 server, and a tagging library.
relay/— TCP relay server for forwarding connectionssocks4-server/— SOCKS4 server implementationtagger/— Library for tagging and handling data with metadata
A TCP relay that forwards connections between clients and agents.
Usage:
# Run relay server (default ports: 8080 for client, 8081 for agent)
./target/release/relayOptions:
- Configure ports and addresses via command-line arguments if supported (see
relay/README.mdor--help).
Implements a SOCKS4 proxy server for client connections.
Usage:
# Run SOCKS4 server (default port: 1080)
./target/release/socks4-serverOptions:
- Configure listening port and other options via command-line arguments if supported (see
socks4-server/README.mdor--help).
A Rust library for tagging data. Not a binary, but can be used as a dependency in your Rust projects.
Usage:
Add to your Cargo.toml:
[dependencies]
tagger = { path = "./tagger" }To build all binaries in optimized, static mode:
- Install the musl target for static linking:
rustup target add x86_64-unknown-linux-musl- Build in release mode for all workspace members:
cargo build --release --target x86_64-unknown-linux-musl
# Non static version
cargo build --release-
The statically linked binaries will be in
target/x86_64-unknown-linux-musl/release/. -
(Optional) Further reduce binary size:
strip target/x86_64-unknown-linux-musl/release/relay
strip target/x86_64-unknown-linux-musl/release/socks4-server |=======================|
|===============| | | |===============|
| Socks Client | === [Initiate Socket] ===>[8080] TCP Relay Server [8081] <=== [Initiate Socket] === | R-Socks Agent |
|===============| | | |===============|
|=======================|MIT