English
redirect (inbound only)
A Linux transparent proxy for TCP: accepts connections that nftables/iptables redirected to it with a redirect (or dnat) rule and routes each one to its original destination address (SO_ORIGINAL_DST, IPv4 and IPv6). Compatible with sing-box redirect. Unlike tproxy it needs neither policy routing nor the TPROXY modules, but it does not accept UDP.
Fields
Only the address listen: host:port; socket settings are the listener block.
Not supported
detour and netns in the listening fields — not implemented yet.
Example
yaml
inbounds:
redirect-in:
redirect:
listen: ":7892"
outbounds:
direct:
direct:
route:
final:
outbound: directAn nftables rule that sends TCP from br-lan to this inbound:
table inet redirect {
chain prerouting {
type nat hook prerouting priority dstnat; policy accept;
iifname "br-lan" fib daddr type local return
iifname "br-lan" meta l4proto tcp redirect to :7892
}
}