danted + redsocks + iptables/nftables全局socks5代理配置

1、danted
安装

1
$ sudo apt install dante-server

配置/etc/danted.conf

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
logoutput: syslog /var/log/sockd.log stdout
internal: br0 port = 1080
external: 10.100.0.32
clientmethod: none
socksmethod: none
user.privileged: proxy
user.unprivileged: nobody
user.libwrap: nobody
client pass {
from: 0.0.0.0/0 port 1-65535 to: 0.0.0.0/0
}
socks pass {
from: 0.0.0.0/8 to: 0.0.0.0/0
command: bind connect udpassociate
log: error
}

References:
[1]