gfwlist 模式下SS 强制独立设备全数据走通道
以下指令仅限于GFWLIST模式。
#增加强制UDP通道转发
ipset -N f-redir iphash
ip rule add fwmark 0x01/0x01 table 100
ip route add local 0.0.0.0/0 dev lo table 100
iptables -t mangle -N SS_TPROXY
iptables -t mangle -N SS_TPROXY_REDIR
iptables -t mangle -A SS_TPROXY -d 100.100.100.100 -j RETURN
iptables -t mangle -A SS_TPROXY -p udp --dport 53 -j RETURN
iptables -t mangle -A SS_TPROXY -p udp -m set --match-set f-redir src -j TPROXY --on-port 1090 --tproxy-mark 0x01/0x01
iptables -t mangle -A SS_TPROXY_REDIR -p udp -m set --match-set f-redir src -j SS_TPROXY
#增加强制TCP通道转发
iptables -t nat -A SS_AC -p tcp -m set --match-set f-redir src -j SS_REDIR
以上步骤完成后,凡是在 f-redir 的中的IP TCP 和UDP都会通过SS通道转发。
接下来我们就只需要把你需要的IP加入到 f-redir 的集中就可以了。指令:
ipset add f-redir xxx.xxx.xxx.xxx
不保证以上指令在所有模式以及所有版本下都可以兼容,如有错请自行学习指令排错。
Comments
So empty here ... leave a comment!