在Ubuntu上搭建Socks5代理服務器的步驟如下:
sudo apt update
sudo apt upgrade
sudo apt install dante-server
/etc/danted.conf
,使用以下命令:sudo nano /etc/danted.conf
將以下內容添加到文件末尾:
internal: eth0 port = 1080
external: eth0
method: username none
user.privileged: root
user.unprivileged: nobody
client pass {
from: 0.0.0.0/0 to: 0.0.0.0/0
log: error connect disconnect
}
socks pass {
from: 0.0.0.0/0 to: 0.0.0.0/0
log: error connect disconnect
}
保存并退出。
sudo systemctl start danted
sudo systemctl enable danted
至此,Socks5代理服務器就已經搭建完成了。你可以將Ubuntu的IP地址和1080端口配置到相應的代理客戶端中,以使用Socks5代理服務。