deluge on docker 如何绕开旁路由 gateway?
不知道 iptables 能不能搞定这件事情,看看大侠有没有比较简单完美的解决方案。
docker
“`
networks:
gitea-net:
driver_opts:
com.docker.network.bridge.name: br_gitea
“`
iptables
“`
iptables -t nat -N REDSOCKS
iptables -t nat -A REDSOCKS -d 0.0.0.0/8 -j RETURN
iptables -t nat -A REDSOCKS -d 10.0.0.0/8 -j RETURN
iptables -t nat -A REDSOCKS -d 127.0.0.0/8 -j RETURN
iptables -t nat -A REDSOCKS -d 169.254.0.0/16 -j RETURN
iptables -t nat -A REDSOCKS -d 192.168.0.0/16 -j RETURN
iptables -t nat -A REDSOCKS -d 224.0.0.0/4 -j RETURN
iptables -t nat -A REDSOCKS -d 240.0.0.0/4 -j RETURN
iptables -t nat -A REDSOCKS -d 172.16.0.0/12 -j RETURN
iptables -t nat -A REDSOCKS -p tcp -j REDIRECT –to-ports 12345
iptables -t nat -A PREROUTING -i br_gitea -j REDSOCKS
“`
redsocks.conf
“`
redsocks {
local_ip = 0.0.0.0;
local_port = 12345;
ip = 192.168.100.2;
port = 7891;
type = socks5;
}
“`