How to setup Shadowsocks Client on CentOS

Arash Arbabi
1 min readDec 3, 2018

--

First you’ll need two things:

Python-pip

Libsodium

Installing Python-pip

Enable EREPL:

sudo yum install epel-release

Install pip:

yum -y install python-pip

Installing Libsodium

yum -y install libsodium

Now we are ready to install shadowsocks itself.

Installing ShadowSocks

In order to get the latest version we will be using the master release on GitHub

pip install https://github.com/shadowsocks/shadowsocks/archive/master.zip -U

Now you’ll need to make your config file:

nano /etc/shadowsocks.json

Inside the file type the following JSON and edit as desired:

{
"server":"my_server_ip",
"server_port":8388,
"local_port":1080,
"password":"barfoo!",
"timeout":600,
"method":"chacha20-ietf-poly1305"
}

Start the ShadowSocks Client Daemon

sudo sslocal -c /etc/shadowsocks.json -d start

Make sure everything is working so far:

curl — socks5-hostname 127.0.0.1:1080 http://wtfismyip.com/json

If the proxy is working you’ll get the following response:

{
"YourF***IPAddress": "Server-IP-that-You-used-in-config",
"YourF***Location": "Country",
"YourF***Hostname": "HostnameHere",
"YourF***ISP": "Server ISP Name",
"YourF***TorExit": "false",
"YourF****CountryCode": "CountryCode"
}

Now you can set your current Terminal session to proxy everything through ShadowSocks:

export http_proxy=socks5://127.0.0.1:1080

export https_proxy=socks5://127.0.0.1:1080

Done!

--

--