1. 首先安装 shadowsocks-libev:
sudo apt-get update
sudo apt-get install shadowsocks-libev
  1. 编辑配置文件 /etc/shadowsocks-libev/config.json
{
    "server":"0.0.0.0",
    "server_port":1080,
    "password":"your_password",
    "timeout":300,
    "method":"aes-256-gcm"
}

其中,server 为服务器 IP 地址,server_port 为端口号,password 为密码,timeout 为超时时间,method 为加密方法。

  1. 启动 shadowsocks-libev:
sudo systemctl start shadowsocks-libev
  1. 验证是否成功启动:
sudo systemctl status shadowsocks-libev

如果状态为 active (running),则说明服务已成功启动。

  1. 安装 Privoxy:
sudo apt-get install privoxy
  1. 编辑配置文件 /etc/privoxy/config
listen-address 127.0.0.1:8118
forward-socks5t / 127.0.0.1:1080 .

其中,listen-address 为监听地址和端口号,forward-socks5t 为 socks5 的转发地址和端口号。

  1. 启动 Privoxy:
sudo systemctl start privoxy
  1. 验证是否成功启动:
sudo systemctl status privoxy

如果状态为 active (running),则说明服务已成功启动。

  1. 测试:

使用任意浏览器设置代理为 127.0.0.1:8118,然后访问任意网站,如果能够正常访问,则说明 socks5 服务已成功启动。

ubuntu 环境下一键创建 socks5 服务端。

原文地址: https://www.cveoy.top/t/topic/NuO 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录