centos7 部署shadowsocks服务端

首先说一下写这篇博客的原因,洒家最近告了个vps,无奈系统与业务不匹配,重装了多次。每次恢复shadowsocks找到的文档和方法都不尽相同。为了后续遇到类似情况不至再费诸多功夫,特意整合和参考的几篇文档。

1、关闭防火墙

#查看所有的可用服务

systemctl list-unit-files |grep service |grep enable

#关闭服务

systemctl stop ipatables#

开机不启动

systemctl disable iptables

安装ShadowSocks

# yum install python-setuptools && easy_install pip

# pip install shadowsocks

 

3创建配置文件/etc/shadowsocks.json

[root@localhost /]# touch /etc/shadowsocks.json

[root@localhost /]# vi /etc/shadowsocks.json

{

    "server":"0.0.0.0",
    "server_port":11098,
    "local_address":"127.0.0.1",
    "local_port":1080,
    "password":"密码",
    "timeout":600,
    "method":"rc4-md5"

}

4、使用配置文件在后台运行shadowsocks服务

[root@localhost /]# ssserver -c /etc/shadowsocks.json -d start

 

备注:若无配置文件,在后台可以使用一下命令运行:

[root@localhost /]# ssserver -p 443 -k MyPass -m rc4-md5 -d start

 

5、停止服务

[root@localhost /]# ssserver -c /etc/shadowsocks.json -d stop


猜你喜欢

转载自blog.csdn.net/superbfly/article/details/80826256