centos 搭建 ss

  1.安装SS

yum install python-setuptools
easy_install pip
pip install shadowsocks

  2.创建***配置文件(配置文件有两种用户模式,分别是:单用户、多用户)

vi  /etc/shadowsocks.json

  配置设置:

{
    "server":"0.0.0.0",
    "server_port":1234,
    "local_address": "127.0.0.1",
    "local_port":1080,
    "password":"替换成ss的密码",
    "timeout":300,
    "method":"aes-256-cfb"
}

  3  启动***服务

vi /usr/lib/systemd/system/ss.service
[Unit]
Description=*** Server
After=network.target

[Service]
PermissionsStartOnly=true
ExecStartPre=/bin/mkdir -p /run/shadowsocks
ExecStartPre=/bin/chown nobody:nobody /run/shadowsocks
ExecStart=/usr/bin/ssserver -c /etc/shadowsocks.json
Restart=on-abort
User=nobody
Group=nobody
UMask=0027

[Install]
WantedBy=multi-user.target

  4 运行服务并设置开机自启:

systemctl start ss
systemctl enable ss

  5 设置 Firewall 防火墙   开启SS支持TCP/UDP协议服务端口:

firewall-cmd --zone=public --add-port=8388/tcp --permanent
firewall-cmd --zone=public --add-port=8388/udp --permanent
firewall-cmd --reload

 

 

 

 

 


 

posted @ 2019-05-19 22:51 方方和圆圆 阅读(...) 评论(...) 编辑 收藏

再过一百年, 我会在哪里?