CentOS服务器搭建ShadowSocks翻墙

Posted by 王进 on 11-24,2019
# 安装pip
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
python get-pip.py

# 安装shadowsocks
pip install shadowsocks

# 配置shadowsocks 新建配置文件
vim /etc/shadowsocks.json
# 写入以下内容保存
{
    "server":"0.0.0.0",
    "server_port":50000,
    "local_port":1080,
    "password":"1234567890",
    "timeout":600,
    "method":"aes-256-cfb"
}


# 将shadowsocks加入系统服务
vi /etc/systemd/system/shadowsocks.service
# 写入以下内容保存
[Unit]
Description=Shadowsocks
[Service]
TimeoutStartSec=0
ExecStart=/usr/bin/ssserver -c /etc/shadowsocks.json
[Install]
WantedBy=multi-user.target


# 启动shadowsocks服务并设置开机自启

# 设置开机自启命令
systemctl enable shadowsocks

# 启动命令
systemctl start shadowsocks

#查看状态命令
systemctl status shadowsocks

Centos端口开放 配置安全组 50000/50000