编程技术记录

世界你好!

shadowsocks 干啥用的,我就不细说了。
安装过程如下

安装pip3

shadowsocks有一个Python语言开发的实现,需要用pip安装

sudo apt-get update
sudo apt-get install python3-pip

安装shadowsocks

pip3 install https://github.com/shadowsocks/shadowsocks/archive/master.zip

查看是否安装成功,安装成功应该会有版本显示

ssserver --version

//Shadowsocks 3.0.0

创建配置文件

sudo mkdir /etc/shadowsocks
cd /etc/shadowsocks

vi config.json

config.json的内容如下

{
    "server":"::",
    "local_address": "127.0.0.1",
    "local_port":1080,
    "port_password":
    {
        "8388":"端口A的密码",
        "9000":"端口B的密码",
        "9001":"端口C的密码"
    },
    "timeout":300,
    "method":"aes-256-cfb",
    "fast_open": false
}

启动server

ssserver -c /etc/shadowsocks/config.json

添加server到系统服务

vi  /etc/systemd/system/shadowsocks-server.service

内容如下

[Unit]
Description=Shadowsocks Server
After=network.target
[Service]
ExecStart=/usr/local/bin/ssserver -c /etc/shadowsocks/config.json
Restart=on-abort
[Install]
WantedBy=multi-user.target

然后就可以以系统服务启动了

sudo systemctl start shadowsocks-server

参考
https://www.drsanwujiang.com/ubuntu-shadowsocks-install-and-optimize/

© Beli. All Rights Reserved.