Subscribe to 亏快链
Subscribe to 亏快链
Share Dialog
Share Dialog
<100 subscribers
<100 subscribers
sudo apt update
sudo apt install dante-server
输入如下命令查看Dante服务状态[会显示失败,因为安装后配置文件未修改]
systemctl status danted.service
可以看到输出了 Active: failed 和一堆告警;
会显示失败,因为安装后配置文件未修改。
接下去进行配置文件的修改。
Dante的配置文件为/etc/danted.conf ,因原文件内容说明内容较多,接下去步骤会全部删除原文件内容,先备份原配置文件。
cp /etc/danted.conf /etc/danted.conf.bak
然后将/etc/danted.conf 中的内容全部替换为以下内容【如下,必须修改external: 补充填写IP;建议修改port=1080为其他端口】
logoutput: stderr
user.privileged: root
user.unprivileged: nobody
#The listening network interface or address.如下端口尽量更改为其他端口
internal: 0.0.0.0 port=1080
#The proxying network interface or address.
external: 补充填写IP
#socks-rules determine what is proxied through the external interface.
socksmethod: username
#client-rules determine who can connect to the internal interface.
clientmethod: none
client pass {
from: 0.0.0.0/0 to: 0.0.0.0/0
}
socks pass {
from: 0.0.0.0/0 to: 0.0.0.0/0
}
三、配置登录用户名和密码
配置登录用户名
sudo useradd -r -s /bin/false username #写个自己喜欢的用户名
为用户名配置密码
sudo passwd username #注意这里是为新加的用户设置密码,根据提示设置密码和确认密码,即可完成
执行以下命令启动danted服务
sudo systemctl restart danted.service
查看服务状态
systemctl status danted.service
查看端口监听情况,通过端口查看,验证danted服务是否正常;查看配置的端口1080(或你修改后的端口是否存在)
netstat -tunpl
(1)使用curl测试(Linux和windows均需自己安装,这一步非必需)
curl -v -x socks5://username:password@server_ip:1080 http://www.baidu.com/
username和password均是刚才设置的,显示类似如下图,为正常。

(2)使用chrome浏览器进行socks5代理访问网站,通过插件代理插件SwitchyOmega来验证。
sudo apt update
sudo apt install dante-server
输入如下命令查看Dante服务状态[会显示失败,因为安装后配置文件未修改]
systemctl status danted.service
可以看到输出了 Active: failed 和一堆告警;
会显示失败,因为安装后配置文件未修改。
接下去进行配置文件的修改。
Dante的配置文件为/etc/danted.conf ,因原文件内容说明内容较多,接下去步骤会全部删除原文件内容,先备份原配置文件。
cp /etc/danted.conf /etc/danted.conf.bak
然后将/etc/danted.conf 中的内容全部替换为以下内容【如下,必须修改external: 补充填写IP;建议修改port=1080为其他端口】
logoutput: stderr
user.privileged: root
user.unprivileged: nobody
#The listening network interface or address.如下端口尽量更改为其他端口
internal: 0.0.0.0 port=1080
#The proxying network interface or address.
external: 补充填写IP
#socks-rules determine what is proxied through the external interface.
socksmethod: username
#client-rules determine who can connect to the internal interface.
clientmethod: none
client pass {
from: 0.0.0.0/0 to: 0.0.0.0/0
}
socks pass {
from: 0.0.0.0/0 to: 0.0.0.0/0
}
三、配置登录用户名和密码
配置登录用户名
sudo useradd -r -s /bin/false username #写个自己喜欢的用户名
为用户名配置密码
sudo passwd username #注意这里是为新加的用户设置密码,根据提示设置密码和确认密码,即可完成
执行以下命令启动danted服务
sudo systemctl restart danted.service
查看服务状态
systemctl status danted.service
查看端口监听情况,通过端口查看,验证danted服务是否正常;查看配置的端口1080(或你修改后的端口是否存在)
netstat -tunpl
(1)使用curl测试(Linux和windows均需自己安装,这一步非必需)
curl -v -x socks5://username:password@server_ip:1080 http://www.baidu.com/
username和password均是刚才设置的,显示类似如下图,为正常。

(2)使用chrome浏览器进行socks5代理访问网站,通过插件代理插件SwitchyOmega来验证。
No activity yet