Inbounds Overview¶
Inbounds accept local or remote client traffic and hand connections to the ClashRS routing dispatcher. You can configure them via:
- Top-level port shorthands (
port,socks-port,mixed-port,redir-port,tproxy-port) - Named
listenersfor full multi-protocol, multi-port control - Top-level
tunnelsfor fixed-target TCP/UDP forwarding inbound-providersfor dynamic file or HTTP listener liststunfor L3 transparent proxying
Top-Level Port Shorthands¶
Each top-level port field (type Port) is converted into a named listener that inherits top-level bind-address, allow-lan, and routing-mark:
| Top-Level Key | Alias | Generated Listener Name | Inbound Type | Implicit Defaults | Required Feature |
|---|---|---|---|---|---|
port |
http_port |
HTTP-IN |
http |
— | Built-in |
socks-port |
— | SOCKS-IN |
socks |
udp: true |
Built-in |
mixed-port |
— | MIXED-IN |
mixed |
udp: true |
Built-in |
redir-port |
— | REDIR-IN |
redir |
— | redir (standard) |
tproxy-port |
— | TPROXY-IN |
tproxy |
udp: true, dns-hijack: true |
tproxy (standard) |
If bind-address is left at its default (0.0.0.0) and top-level ipv6: true, shorthand listeners automatically upgrade to dual-stack ::.
Supported listeners Types¶
| Type | Transport | Platform / Feature | Reference |
|---|---|---|---|
http |
TCP | All / built-in | HTTP & Mixed |
mixed |
TCP + SOCKS5 UDP | All / built-in | HTTP & Mixed |
socks |
TCP + UDP (UDP_ASSOCIATE) |
All / built-in | SOCKS5 |
tproxy (or t-proxy) |
TCP + UDP | Linux, Android / tproxy |
Transparent Proxy |
redir |
TCP | Linux / redir |
Transparent Proxy |
tunnel |
TCP / UDP | All / built-in | Tunnel |
shadowsocks |
TCP + UDP | All / shadowsocks |
Proxy Protocols |
anytls |
TCP + UoT v2 | All / built-in | Proxy Protocols |
hysteria2 |
QUIC (UDP) | All / built-in | Proxy Protocols |
Common listeners Fields¶
Every entry in listeners shares these base fields:
| Key | Type | Required | Default | Description |
|---|---|---|---|---|
name |
string |
Yes | — | Listener name. |
type |
string |
Yes | — | Inbound type from the table above. |
listen |
BindAddress |
Yes | — | Listen IP (*, localhost, ::, [::], or IP literal). |
port |
u16 |
Yes | — | Listen port (integer). |
allow-lan |
bool |
No | false |
Allow connections from non-local addresses (currently not enforced on tunnel and tproxy). |
fw-mark |
SocketMark |
No | None |
Linux/Android SO_MARK propagated to Session.so_mark. |
Deduplication & Authentication¶
- Precedence:
listenersentries are registered first, followed bytunnels, and finally top-level port shorthands. Identical entries are deduplicated with a warning (note thatnameis part of equality, so listeners with different names on the same port will conflict at bind time). - Global
authentication: Top-levelauthentication: ["user:pass"]applies tohttp,socks, andmixedlisteners (both shorthand andlisteners[]). Protocol inbounds (shadowsocks,anytls,hysteria2) use their ownpassword/userscredentials instead. - Hot user updates: For
shadowsocks,anytls, andhysteria2, updatingusersviainbound-providersreloads credentials in place without restarting the listening socket. See Providers.