Transparent Proxy Inbounds (TProxy & Redir)¶
In addition to TUN, ClashRS supports kernel-level transparent proxying via TProxy (TCP + UDP) and Redir (TCP).
TProxy Inbound (type: tproxy)¶
- Platforms: Linux and Android only (logs a warning and skips on other platforms).
- Feature:
tproxy(enabled instandard/ default builds). - Transport: TCP and UDP (
IP_TRANSPARENT). - Aliases: Both
type: tproxyandtype: t-proxyare accepted.
Fields¶
In addition to common listener fields (name, listen, port, allow-lan, fw-mark):
| Key | Type | Default | Description |
|---|---|---|---|
udp |
bool |
true |
Accepted in config; at runtime TproxyInbound always handles UDP. |
dns-hijack |
bool |
true |
Hijack TProxy UDP DNS traffic to the built-in DNS resolver. |
Loop Avoidance on Linux
Always set top-level routing-mark (or fw-mark) and exclude that mark in your iptables / nftables TPROXY rules so outbound connections generated by ClashRS are not redirected back into tproxy-port.
Redir Inbound (type: redir)¶
- Platforms: Linux only (uses
SO_ORIGINAL_DST/IP6T_SO_ORIGINAL_DST). - Feature:
redir(enabled instandard/ default builds). - Transport: TCP only.
- Type-specific fields: None beyond common listener fields.