Skip to content
Edit this page

SOCKS5 Inbound

The socks inbound implements SOCKS5 (RFC 1928) with TCP CONNECT, UDP UDP_ASSOCIATE, and optional username/password authentication (RFC 1929).

  • Platform / Feature: All platforms, built-in.
  • Authentication: Uses top-level authentication (username:password entries).
  • Type-specific fields:
  • udp (bool, optional, default true): Accepted in config; at runtime UDP_ASSOCIATE is always enabled on the SOCKS5 TCP handshake (no static UDP bind port is opened separately).
socks-port: 7891
bind-address: 127.0.0.1
allow-lan: false
authentication:
  - "alice:secret123"
listeners:
  - name: socks-in
    type: socks
    listen: 127.0.0.1
    port: 7891
    allow-lan: false
    udp: true

Routing & Testing

Match SOCKS5 traffic in rules using IN-TYPE,SOCKS,<TARGET> (or SOCKS5):

rules:
  - IN-TYPE,SOCKS,PROXY

Verify with curl:

curl --socks5-hostname 127.0.0.1:7891 https://example.com