今天闲来无事准备做一个socks5代理发现github的脚本都不是很好用加上github的ram域名被屏蔽了
现在用这个脚本吧
https://shagain.club/index.php/archives/428/
1.安装dante-server
apt-get install dante-server
2.修改配置文件:
备份原配置文件
mv /etc/danted.conf /etc/danted.conf.bak
新建配置文件
touch /etc/danted.conf
vim /etc/danted.conf
匿名配置内容
logoutput: /var/log/danted.log
internal: 你的IP地址 port = 1080
external: 你的IP地址
method: username none
user.privileged: proxy
user.notprivileged: nobody
user.libwrap: nobody
client pass {
from: 0.0.0.0/0 to: 0.0.0.0/0
log: connect disconnect
}
pass {
from: 0.0.0.0/0 to: 0.0.0.0/0 port gt 1023
command: bind
log: connect disconnect
}
pass {
from: 0.0.0.0/0 to: 0.0.0.0/0
command: connect udpassociate
log: connect disconnect
}
block {
from: 0.0.0.0/0 to: 0.0.0.0/0
log: connect error
}
3.创建log文件夹
mkdir /var/log/sockd
4.启动Dante
/etc/init.d/danted start
5.检测是否启动成功
netstat -anp | grep 1080
特别提醒需要自己在防火墙把端口放行国内的大厂看看有没有第二重防火墙
到这里基本上就好了如果需要身份验证就看下面
谷歌浏览器使用的话推荐这个插件
开启用户身份验证
sudo vim /etc/danted.conf
写入配置
logoutput: /var/log/danted.log
internal: 你的IP地址 port = 8001
external: 你的IP地址
method: username #none
user.privileged: root
user.notprivileged: 用户名(注意前面的空格。。。。)
user.libwrap: nobody
client pass {
from: 0.0.0.0/0 to: 0.0.0.0/0
log: connect disconnect
}
pass {
from: 0.0.0.0/0 to: 0.0.0.0/0
command: bind connect udpassociate
log: error # connect disconnect iooperation
method: username
}
block {
from: 0.0.0.0/0 to: 0.0.0.0/0
log: connect error
}
可以使用useradd指令添加一个用户 如danted
然后设置密码passwd danted
Comments | NOTHING