使用 ss-redir 转发,端口 1080
ipset create chinaip hash:ip
ipset add chinaip 0.0.0.0/8
ipset add chinaip 10.0.0.0/8
ipset add chinaip 127.0.0.0/8
ipset add chinaip 169.254.0.0/16
ipset add chinaip 172.16.0.0/12
ipset add chinaip 192.168.0.0/16
ipset add chinaip 224.0.0.0/4
ipset add chinaip 240.0.0.0/4
ipset add chinaip $SERVER_addr
iptables -t nat -A PREROUTING -p tcp -m set ! --match-set chinaip dst -j REDIRECT --to-port 1080
iptables -t nat -A OUTPUT -p tcp -m set ! --match-set chinaip dst -j REDIRECT --to-port 1080
就是不知到在 dnsmasq 上怎么写,是这样吗?(应该不是吧)
ipset=/1.0.1.0/24/chinaip
ipset=/1.0.2.0/23/chinaip
...