configuration ss in centos7

Centos7下Shadowsocks安装指南

  1. 组件安装
  2. 服务器配置
  3. 设置自启动

组件安装

yum install m2crypto python-setuptools
easy_install pip
pip install shadowsocks
yum install -y openssl-devel gcc swig python-devel autoconf libtool

服务器配置

vi /etc/shadowsocks.json

{
    "server":"0.0.0.0",   //不用管
    "server_port":8888, //端口号
    "local_address": "127.0.0.1",   //默认为ss宿主ips
    "local_port":1080,
    "password":"my_password",   //密码设置
    "timeout":300,
    "method":"aes-256-cfb", //加密方式
    "fast_open": false
}

多端口配置

{
    "server":"my_ip_address",
    "local_address": "127.0.0.1",
    "local_port":1080,
    "port_password": {
         "8888": "my_password",
         "8899": "my_password"
     },
    "timeout":300,
    "method":"aes-256-cfb",
    "fast_open": false
}

设置自启动

vim /etc/systemd/system/shadowsocks.service

[Unit]
Description=Shadowsocks

[Service]
TimeoutStartSec=0
ExecStart=/usr/bin/ssserver -c /etc/shadowsocks.json

[Install]
WantedBy=multi-user.target

猜你喜欢

转载自www.cnblogs.com/Monet/p/9728448.html
ss