admin

用Dante Proxy在Debian 11上搭建Socks代理
1.更新服务器apt update && apt upgrade -y 2.安装Dante Pro...
扫描右侧二维码阅读全文
09
2023/02

用Dante Proxy在Debian 11上搭建Socks代理

1.更新服务器

apt update && apt upgrade -y

2.安装Dante Proxy

apt install dante-server

安装完成后,查看下安装的版本号

danted -v

因为还没有配置过,这个时候查看socks代理状态,默认是禁用的(如图)

systemctl status danted.service

socks disable.png

3.修改配置文件

vi /etc/danted.conf

把文件中的内容替换为:

logoutput: syslog
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: eth0

# 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
}

4.配置防火墙
如果有开启防火墙,则允许需要用到的1080端口

ufw allow 1080

5.为socks创建账号

useradd -r -s /bin/false your_dante_user
passwd your_dante_user

6.重启Dante

systemctl restart danted.service

7.查看Dante运行是否正常

systemctl status danted.service

socks ss.png
像截图这样说明运行正常
8.用v2rayN连接代理
在v2rayN里添加socks服务器
socks v2rayN.png

也可以选择用一键安装脚本
https://github.com/Lozy/danted

Socks代理官网
https://www.inet.no/dante/

参考资料
https://www.digitalocean.com/community/tutorials/how-to-set-up-dante-proxy-for-private-connections-on-debian-11
https://community.hetzner.com/tutorials/install-and-configure-danted-proxy-socks5#step-1---install-dante

Last modification:February 17th, 2024 at 01:11 pm
如果觉得我的文章对你有用,请随意赞赏

Leave a Comment