Deploy ShadowSocks on CentOS

ShadowSocks社区是挺给力的, 在CentOS上可以安装最新版软件.

Install Package

$ wget -P /etc/yum.repos.d/ https://copr.fedorainfracloud.org/coprs/librehat/shadowsocks/repo/epel-7/librehat-shadowsocks-epel-7.repo
$ yum install -y shadowsocks-libev
$ vi /etc/shadowsocks-libev/config.json
$ systemctl --now enable shadowsocks-libev
{
    "server": "0.0.0.0",
    "server_port": 8388,
    "local_port": 1080,
    "password": "******",
    "timeout": 60,
    "method": "salsa20"
}

Config Firewall

$ yum install -y bash-completion
$ firewall-cmd --permanent --new-service=shadowsocks
$ vi /etc/firewalld/services/shadowsocks.xml
$ firewall-cmd --permanent --add-service=shadowsocks
$ firewall-cmd --reload
<?xml version="1.0" encoding="utf-8"?>  
<service>  
  <short>ShadowSocks</short>
  <description>ShadowSocks</description>
  <port protocol="tcp" port="8388"/>
  <port protocol="udp" port="8388"/>
</service>