From 2faa8b1b9e3ace4473fff5097eec86be74c0cad1 Mon Sep 17 00:00:00 2001 From: klzgrad Date: Sat, 28 Sep 2019 13:33:33 +0000 Subject: [PATCH] Document usage of redir:// --- USAGE.txt | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/USAGE.txt b/USAGE.txt index a93eda6b0f..314b600536 100644 --- a/USAGE.txt +++ b/USAGE.txt @@ -34,8 +34,16 @@ Options: --listen=://[addr][:port] Listens at addr:port with protocol . Allowed values for - proto: "socks", "http". The default proto is socks. The default - addr is 0.0.0.0. The default port is 1080. + proto: "socks", "http", "redir". The default proto is socks. + The default addr is 0.0.0.0. The default port is 1080. + + For redirecting local traffic from the same machine: + + iptables -t nat -A OUTPUT -p tcp -d ... -j REDIRECT --to-ports 1080 + + For redirecting forwarded traffic on a router: + + iptables -t nat -A PREROUTING -p tcp -d ... -j REDIRECT --to-ports 1080 --proxy=://[:@][:]