安装:
sudo yum -y install epel-release sudo yum -y install python-pip sudo pip install shadowsocks
在目录/etc/shadowsocks下新建名为shadowsocks.json的文件,内容如下:
{ "server":"35.220.133.125", "server_port":8787, "local_address": "127.0.0.1", "local_port":1080, "password":"654321", "timeout":300, "method":"aes-128-cfb", "fast_open": false, "workers": 1 }
在目录/etc/systemd/system/中新建名为shadowsocks的文件,内容如下:
[Unit] Description=Shadowsocks [Service] TimeoutStartSec=0 ExecStart=/usr/bin/sslocal -c /etc/shadowsocks/shadowsocks.json [Install] WantedBy=multi-user.target
启示Shadowsocks:
systemctl enable shadowsocks systemctl start shadowsocks systemctl status shadowsocks
测试:
curl --socks5 127.0.0.1:1080 http://httpbin.org/ip
若正常返回包含ip地址的json,说明shadowsocks工作正常。
© 版权声明
文章版权归作者所有,未经允许请勿转载。
THE END