A SOCKS5 proxy you can actually run

Single C file. Config file. One-command systemd install. Auth, IP allow-lists, and an event-driven core — without a stack of dependencies.

$ make
clang -std=c11 -O2 -o socks5 socks5.c $ ./socks5 --bind 127.0.0.1 --user alice:s3cret
Listening on 127.0.0.1:1080 (auth=on, users=1)

Get up and running

1
Build

Needs a C11 compiler. That is it.

2
Run locally

Bind to localhost unless you mean to share the proxy.

3
Point a client at it

curl --socks5-hostname alice:s3cret@127.0.0.1:1080 https://example.com

# Clone, build, run on localhost
git clone https://github.com/Interlaced-Pixel/socks-proxy.git
cd socks-proxy
make
./socks5 --bind 127.0.0.1 --user alice:s3cret
Do not start an open proxy on 0.0.0.0. The default bind is all interfaces with no authentication. Use --bind 127.0.0.1, --user, or --allow-ip before exposing the port.

Easy to manage

Settings live in a config file. The systemd unit reads that file — passwords stay out of ps and unit files.

# /etc/socks5.conf
bind 127.0.0.1
port 1080
user alice:s3cret
allow-ip 127.0.0.1
connect-only true
timeout 300
# Install as a systemd service (Linux)
sudo ./socks5 --bind 127.0.0.1 --user alice:s3cret --install systemd
socks5 --status
journalctl -u socks5 -f

# Change settings, then restart
sudo $EDITOR /etc/socks5.conf
sudo systemctl restart socks5

Why socks-proxy?

01.

Tiny binary

One C11 file, no runtime dependencies. Typical RSS stays around 5 MB.

02.

RFC compliant

SOCKS5 (RFC 1928), username/password (RFC 1929), optional GSSAPI (RFC 1961).

03.

Event-driven

epoll on Linux, kqueue on macOS/BSD. One thread, non-blocking I/O, CONNECT / BIND / UDP.

04.

Access control

Users, IP allow-lists, connect-only mode, and idle timeouts. Open-proxy installs are refused.

05.

Config, not flags

--config and --auth-file keep secrets off the command line. CLI flags still override the file.

06.

Service install

--install systemd writes the binary, /etc/socks5.conf, and a hardened unit, then starts it.