Friday, January 17, 2020

Setting up shadowsocks-libev on CentOS


Official Repo for shadowsocks-libev

1. Installation
yum install epel-release -y
yum install gcc gettext autoconf libtool automake make pcre-devel asciidoc xmlto c-ares-devel libev-devel libsodium-devel mbedtls-devel -y
ln -s /usr/lib64/libmbedcrypto.so.3 /usr/lib64/libmbedcrypto.so.2

cd /etc/yum.repos.d/
wget https://copr.fedoraproject.org/coprs/librehat/shadowsocks/repo/epel-7/librehat-shadowsocks-epel-7.repo
yum update
yum install shadowsocks-libev

2. Configuration
vi /etc/shadowsocks-libev/config.json
{
    "server":"0.0.0.0",
    "server_port":8888,
    "local_port":1080,
    "password":"xxxxxxxxxxx",
    "timeout":60,
    "method":"aes-256-cfb"
}

Notes for encryption method:
aes-256-cfb is strong
chacha20 is lightweight (less CPU consuming)

3. Service
# run application on startup
systemctl enable shadowsocks-libev
systemctl start shadowsocks-libev
systemctl status shadowsocks-libev
chkconfig shadowsocks-libev on

4. Firewall
systemctl status firewalld
firewall-cmd --state
firewall-cmd --list-port

# configure firewall (if needed)
firewall-cmd --zone=public --add-port=8888/tcp --permanent
firewall-cmd --zone=public --add-port=8888/udp --permanent
firewall-cmd --reload

5. Journal/logs
journalctl | grep ss-server













No comments:

Post a Comment