dante-server是一个很好的socks4/5代理服务器软件。
使用apt-get安装
apt-get install dante-server
添加一个用户
useradd proxyuser
passwd proxyuser
禁止proxyuser用户登录系统(安全考虑)
sudo vim /etc/passwd
将proxyuser的shell改成 /bin/false
配置danted.conf
sudo mv /etc/danted.conf /etc/danted.conf_old
sudo vim /etc/danted.conf
输入以下内容:
#
#logoutput: stderr
#logoutput: syslog
logoutput: /var/log/sockd/sockd.log
internal: 0.0.0.0 port = 10080
external: eth0
#method: username none
#method: pam
method: username
user.privileged: root
user.notprivileged: proxyuser
user.libwrap: nobody
compatibility: sameport
compatibility: reuseaddr
extension: bind
client pass {
from: 0.0.0.0/0 to: 0.0.0.0/0
log: connect disconnect error
}
pass {
from: 0.0.0.0/0 to: 0.0.0.0/0
command: bind
log: connect disconnect error
}
pass {
from: 0.0.0.0/0 to: 0.0.0.0/0
command: bindreply udpreply
log: connect error
}
pass {
from: 0.0.0.0/0 to: 0.0.0.0/0 port 1-65535
protocol: tcp udp
}
pass {
from: 0.0.0.0/0 to: 0.0.0.0/0 port 1-65535
command: udpassociate
}
#block {
# from: 0.0.0.0/0 to: 0.0.0.0/0 port 1-65535
# protocol: tcp udp
# log: connect erro
#}
创建log文件夹
mkdir /var/log/sockd
启动dante-server
/etc/init.d/danted start
查看是否监听成功:
netstat -anp | grep 10080
现在你就可以使用socks5了