Server
$ sudo apt update
$ sudo apt install snapd
$ sudo snap install core
$ sudo snap install shadowsocks-libev
#用以下命令在终端生成一个强密码
$ openssl rand -base64 16
$ cat /var/snap/shadowsocks-libev/common/server-config.json
{
"server":"0.0.0.0",
"server_port":8443,
"password":"$assWord$/A",
"name_server":"8.8.8.8",
"method":"chacha20-ietf-poly1305"
}
$ cat /etc/systemd/system/shadowsocks-libev-server.service
[Unit]
Description=Shadowsocks Server
After=network.target
[Service]
Restart=on-abnormal
ExecStart=/snap/bin/shadowsocks-libev.ss-server -c /var/snap/shadowsocks-libev/common/server-config.json
[Install]
WantedBy=multi-user.target
$ sudo systemctl start shadowsocks-libev-server.service
$ sudo systemctl enable shadowsocks-libev-server.service
$ sudo systemctl status shadowsocks-libev-server.service
$ sudo ufw allow 8443/tcp
Client
$ cat /var/snap/shadowsocks-libev/common/client-config.json
{
"server":"xx.xx.xx.xx",
"server_port":8443,
"local_port":1080,
"local_address": "0.0.0.0",
"password":"$assWord$/A",
"method":"chacha20-ietf-poly1305"
}
$ cat /etc/systemd/system/shadowsocks-libev-client.service
[Unit]
Description=Shadowsocks Client
After=network.target
[Service]
Restart=on-abnormal
ExecStart=/snap/bin/shadowsocks-libev.ss-local -c /var/snap/shadowsocks-libev/common/client-config.json
[Install]
WantedBy=multi-user.target
$ sudo systemctl start shadowsocks-libev-client.service
$ sudo systemctl enable shadowsocks-libev-client.service
$ sudo systemctl status shadowsocks-libev-client.service
非常感谢,提供了很大的帮助,非常谢谢。
不错的文章,帮助到我了。
这个已经不太好用了,现在流行sing-box