dante-server是一个很好的socks4/5代理服务器软件。
- 使用apt-get安装
1 |
apt-get install dante-server |
- 添加一个用户
1 2 |
useradd proxyuser passwd proxyuser |
- 禁止proxyuser用户登录系统(安全考虑)
1 |
sudo vim /etc/passwd |
将proxyuser的shell改成 /bin/false
- 配置danted.conf
1 2 |
sudo mv /etc/danted.conf /etc/danted.conf_old sudo vim /etc/danted.conf |
输入以下内容:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 |
# #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文件夹
1 |
mkdir /var/log/sockd |
- 启动dante-server
1 |
/etc/init.d/danted start |
- 查看是否监听成功:
1 |
netstat -anp | grep 10080 |
现在你就可以使用socks5了