Skip to content

Simple Reverse Socks (V4) - Includes a tcp-relay and a socks-agent (which connect back to the relay). Fully ASYNC support.

Notifications You must be signed in to change notification settings

TalNir01/reverse-socks4

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

reverse-socks4

A Rust-based toolkit for reverse SOCKS4 proxying, including a relay server, SOCKS4 server, and a tagging library.

Project Structure

  • relay/ — TCP relay server for forwarding connections
  • socks4-server/ — SOCKS4 server implementation
  • tagger/ — Library for tagging and handling data with metadata

Binaries

1. Relay Server (relay)

A TCP relay that forwards connections between clients and agents.

Usage:

# Run relay server (default ports: 8080 for client, 8081 for agent)
./target/release/relay

Options:

  • Configure ports and addresses via command-line arguments if supported (see relay/README.md or --help).

2. SOCKS4 Server (socks4-server)

Implements a SOCKS4 proxy server for client connections.

Usage:

# Run SOCKS4 server (default port: 1080)
./target/release/socks4-server

Options:

  • Configure listening port and other options via command-line arguments if supported (see socks4-server/README.md or --help).

3. Tagger Library (tagger)

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" }

Building (Static Release Binaries)

To build all binaries in optimized, static mode:

  1. Install the musl target for static linking:
rustup target add x86_64-unknown-linux-musl
  1. Build in release mode for all workspace members:
cargo build --release --target x86_64-unknown-linux-musl
# Non static version
cargo build --release
  1. The statically linked binaries will be in target/x86_64-unknown-linux-musl/release/.

  2. (Optional) Further reduce binary size:

strip target/x86_64-unknown-linux-musl/release/relay
strip target/x86_64-unknown-linux-musl/release/socks4-server

Example Network Diagram

                                               |=======================|
|===============|                              |                       |                              |===============|
| Socks Client  | === [Initiate Socket] ===>[8080] TCP Relay Server [8081] <=== [Initiate Socket] === | R-Socks Agent |
|===============|                              |                       |                              |===============|
                                               |=======================|

License

MIT

About

Simple Reverse Socks (V4) - Includes a tcp-relay and a socks-agent (which connect back to the relay). Fully ASYNC support.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages