selfhost.directory

The index of self-hostable projects — ranked, categorized and served with live updates.
Own your data and stop giving it to big tech.

GitHub
HevSocks5Server logo

Self-host HevSocks5Server

2.13.1

Lightweight SOCKS5 proxy server with dual-stack UDP relay

ReleaseOpen SourceMIT
Updated5 days ago
LanguageC
Setup difficultyEasy
Stars
620
Port
1080 (SOCKS5 listen port)
Install with OpenWrt

What is HevSocks5Server?

HevSocks5Server is a lightweight SOCKS5 proxy server aimed at personal networks, servers and routers that need a fast, low-overhead proxy. It implements the standard CONNECT and UDP ASSOCIATE commands (UDP relay is not supported on Windows at this time), adds an extended FWD UDP command that carries UDP over TCP, and works across both IPv4 and IPv6 in a dual-stack setup. Several username/password accounts can be defined in an authentication file, which the running process reloads when it receives SIGUSR1; by assigning a hexadecimal mark per account you can combine it with iptables connlimit rules to cap how many connections a user may open. Operators run it as a standalone binary with a YAML config (worker count, listen address and port, bind addresses, timeouts, logging, optional daemon/pid-file mode), or embed it into their own programs via its C, Java and Kotlin APIs. Prebuilt binaries ship with each GitHub release for Linux (several architectures), macOS, FreeBSD and Windows, and an OpenWrt package is available via opkg; no Docker image is documented.

Should you self-host HevSocks5Server?

HevSocks5Server scores 50/100 on selfhost.directory (how scoring works) and ranks #15 of 25 in Proxy. It has 620 GitHub stars.

It shipped 6 stable releases in the past year. The latest, 2.13.1, came out on 8 August 2026. New versions land roughly every 3 months.

Setup is easy: most people get it running in one sitting. It is MIT-licensed and written mostly in C.

Its closest alternative on selfhost.directory is frp (85/100, 110 243 stars). It scores higher overall, so compare the two before you pick. See HevSocks5Server vs frp side by side.

Features

  • Daemon Mode
  • Dual-stack IPv4/IPv6
  • Embeddable library API
  • Live auth file reload
  • Multi-threaded workers
  • Per-user connection limits
  • SOCKS5 proxy (CONNECT)
  • UDP over TCP
  • UDP RelayWindows is not supported at this time.
  • Username/password authentication

HevSocks5Server README

How to install HevSocks5Server

Install HevSocks5Server with OpenWrt

# Install package
opkg install hev-socks5-server

# Edit /etc/config/hev-socks5-server

# Restart service
/etc/init.d/hev-socks5-server restart

How to configure HevSocks5Server

  • bind-addressmain: bind source address (ipv4|ipv6); overridden by bind-address-v{4,6} if specified

    main: bind source address (ipv4|ipv6); overridden by bind-address-v{4,6} if specified

  • bind-address-v4main: bind source address (ipv4)

    main: bind source address (ipv4)

  • bind-address-v6main: bind source address (ipv6)

    main: bind source address (ipv6)

  • bind-interfacemain: bind source network interface

    main: bind source network interface

  • connect-timeoutmisc: TCP connect timeout (ms)

    misc: TCP connect timeout (ms)

  • domain-address-typeunspecmain: domain address type

    main: domain address type

    values: ipv4|ipv6|unspec

  • fileauth: path to the authentication file (USERNAME PASSWORD MARK lines)

    auth: path to the authentication file (USERNAME PASSWORD MARK lines)

  • limit-nofilemisc: if present, set rlimit nofile; else use default value

    misc: if present, set rlimit nofile; else use default value

  • listen-address'::'main: listen address (ipv4|ipv6)

    main: listen address (ipv4|ipv6)

    values: ipv4|ipv6

  • listen-ipv6-onlyfalsemain: listen ipv6 only

    main: listen ipv6 only

    values: true|false

  • log-filemisc: log destination

    misc: log destination

    values: null, stdout, stderr or file-path

  • log-levelmisc: log level

    misc: log level

    values: debug, info, warn or error

  • mark0main: socket mark (hex: 0x1, dec: 1, oct: 01)

    main: socket mark (hex: 0x1, dec: 1, oct: 01)

  • passwordauth: password (single-account inline config)

    auth: password (single-account inline config)

  • pid-filemisc: if present, run as a daemon with this pid file

    misc: if present, run as a daemon with this pid file

  • port1080main: listen port

    main: listen port

  • task-stack-sizemisc: task stack size (bytes)

    misc: task stack size (bytes)

  • tcp-fastopenmain: TCP fastopen

    main: TCP fastopen

    values: true|false

  • tcp-read-write-timeoutmisc: TCP read-write timeout (ms)

    misc: TCP read-write timeout (ms)

  • udp-copy-buffer-numsmisc: number of udp buffers in splice, 1500 bytes per buffer

    misc: number of udp buffers in splice, 1500 bytes per buffer

  • udp-listen-addressmain: UDP listen address (ipv4|ipv6)

    main: UDP listen address (ipv4|ipv6)

    values: ipv4|ipv6

  • udp-portmain: UDP listen port (0: random, a-b: range)

    main: UDP listen port (0: random, a-b: range)

    values: 0 (random) or a-b range

  • udp-public-address-v4main: UDP public address (ipv4)

    main: UDP public address (ipv4)

  • udp-public-address-v6main: UDP public address (ipv6)

    main: UDP public address (ipv6)

  • udp-read-write-timeoutmisc: UDP read-write timeout (ms)

    misc: UDP read-write timeout (ms)

  • udp-recv-buffer-sizemisc: UDP socket recv buffer (SO_RCVBUF) size (bytes)

    misc: UDP socket recv buffer (SO_RCVBUF) size (bytes)

  • usernameauth: username (single-account inline config)

    auth: username (single-account inline config)

  • workers4main: number of worker threads

    main: number of worker threads

HevSocks5Server releases & version history

More in Network Utilities

Rate this project

Click to rate — no account needed.

0 comments

Posting as guest
Loading comments…