Skip to content

SOCKS5 ​

SOCKS5 (RFC 1928): CONNECT, UDP ASSOCIATE, and username and password login (RFC 1929). An outbound carries TCP only.

Structure ​

json
{
  "tag": "socks-in",
  "listen": "127.0.0.1",
  "port": 1080,
  "transport": [{ "type": "tcp" }],
  "protocol": {
    "type": "socks5",
    "settings": {
      "users": [{ "name": "alice", "password": "correct horse" }],
      "udp_relay": true,
      "udp_max_datagram_size": 8192,
      "handshake_timeout": "10s"
    }
  }
}

Inbound fields ​

users ​

list of users

Each user has a name and a password, up to 255 bytes each. With none, no login is asked: anyone who reaches the port may use it, and check warns off loopback. See Users.

udp_relay ​

booleanDefault: true

Accept UDP ASSOCIATE. The association ends when its control connection closes.

udp_max_datagram_size ​

integer, bytesDefault: 8192

The largest UDP payload taken from a client, at most 65,507. Match the inbound's udp_max_datagram_size.

Outbound fields ​

username, password ​

string

The login, if the server asks for one. Set both or neither.

Fields for both ​

handshake_timeout ​

durationDefault: 10s

How long the SOCKS5 handshake may take.