PuddleJump is a lightweight, dynamic SOCKS4 proxy wrapper for Linux written in C. It intercepts standard TCP network connections initiated by applications using LD_PRELOAD and transparently routes them through a local SOCKS4 proxy (such as Tor running on port 9050).
This allows you to "proxy-ize" CLI tools and legacy applications without modifying their source code.
PuddleJump uses dynamic linking manipulation:
- It overrides the standard
connect()system function provided bylibc. - When an application attempts to establish a network connection, PuddleJump intercepts the call.
- It opens a socket to the specified SOCKS4 proxy (
127.0.0.1:9050by default). - It performs a SOCKS4 handshake (
VN=4,CD=1) to request a connection to the application's original intended destination. - Once the proxy confirms traversal (
CD=90), PuddleJump replaces the application's socket descriptor with the proxy socket usingdup2(), seamlessly passing control back to the application.
.
├── PuddleJump.c # Core implementation
├── PuddleJump.h # Header definitions and configuration
├── Makefile # Build instructions
└── README.md
| File | Description |
|---|---|
PuddleJump.c |
Core implementation intercepting connect() and managing the SOCKS4 handshake. |
PuddleJump.h |
Configuration constants, packed SOCKS4 request/response structures, and header definitions. |
Makefile |
Build instructions for compiling the shared library (PuddleJump.so). |
Before compiling, ensure you have:
- Linux
gccmake- A running SOCKS4 proxy service (default: Tor listening on
127.0.0.1:9050)
Clone the repository:
git clone https://github.com/SV13/PuddleJump.git
cd PuddleJumpCompile the project:
makeThis will generate:
PuddleJump.so
To force an application's network traffic through the proxy, preload the shared library using LD_PRELOAD.
LD_PRELOAD=./PuddleJump.so <command>LD_PRELOAD=./PuddleJump.so curl https://icanhazip.comLD_PRELOAD=./PuddleJump.so wget http://example.comIf your SOCKS4 proxy is running on another host or port, modify the values inside PuddleJump.h before compiling.
#define PROXY "127.0.0.1"
#define PROXYPORT 9050
#define USERNAME "Puddlejumper"After making changes, rebuild the project:
make clean
make- Works by intercepting the
connect()system call. - Designed for dynamically linked Linux executables.
- Uses
LD_PRELOAD, so statically linked binaries cannot be intercepted. - Compatible with SOCKS4-compatible proxies such as Tor (with SOCKS4 support enabled).
This project is licensed under the MIT License.