Install and Configure Shadowsocks Client On Ubuntu 20.04

We can install and configure shadowsocks client on ubuntu 20.04/18.04 using the command line interface. Shadowsocks is an open-source encryption protocol project which is mainly designed by a Chinese programmer. 

This is a secure socks5 proxy and designed to filter internet traffic. 

Install and Configure Shadowsocks Client On Ubuntu 20.04

If you get this error while installing the above packages, you need to install the python development packages. 

Error: Package 'python-m2crypto' has no installation candidate

Check Out: How To Copy AMI Image From One Region To Another Region

To solve these issues, install the python-dev 

ubuntu@ubuntu:~$ sudo apt-get install python-dev
Reading package lists... Done
Building dependency tree 
Reading state information... Done
Note, selecting 'python-dev-is-python2' instead of 'python-dev'
The following package was automatically installed and is no longer required:
Use 'sudo apt autoremove' to remove it.
The following additional packages will be installed:
libpython2-dev libpython2.7-dev python-is-python2 python2-dev python2.7-dev
The following NEW packages will be installed:
libpython2-dev libpython2.7-dev python-dev-is-python2 python-is-python2
python2-dev python2.7-dev
0 upgraded, 6 newly installed, 0 to remove and 15 not upgraded.
Need to get 2,772 kB of archives.
After this operation, 14.2 MB of additional disk space will be used.
Do you want to continue? [Y/n] y

Once it’s installed, we will install the below package. This is available in the ubuntu repository. 

ubuntu@ubuntu:~$ sudo apt-get install python-m2crypto

If you have python3 installed on your machine use the below command

sudo apt install python3-pip
sudo pip install shadowsocks

Check Out: How To Boot Windows 10/7 Machine In Safe Mode


you can also use the below one. The command depends on your pip version.

ubuntu@ubuntu:~$ sudo pip3 install shadowsocks
Collecting shadowsocks
Downloading shadowsocks-2.8.2.tar.gz (36 kB)
Building wheels for collected packages: shadowsocks
Building wheel for shadowsocks ( ... done
Created wheel for shadowsocks: filename=shadowsocks-2.8.2-py3-none-any.whl size=51658 sha256=41f5aefb0c6a1ce745e27d3240bd5182b3b508767713b2ef77d0e97aba96633e
Stored in directory: /root/.cache/pip/wheels/47/08/99/6df06d7a450f2477ff6684a5057dcb55a2671b8cd5dae81ee2
Successfully built shadowsocks
Installing collected packages: shadowsocks
Successfully installed shadowsocks-2.8.2

Now we need to find the location of sslocal is client software and ssserver is server software in the ubuntu. you can find it at the below location. 

ubuntu@ubuntu:~$ whereis sslocal
sslocal: /usr/local/bin/sslocal

Configure Shadowsocks on Ubuntu:

We will create a file under the directory vim /etc/shawdow.json and put the code in this file. Replace IP and password with your own. 

"local_address": "",

Save and close the file. Run the below command to start the client. 

sudo sslocal -c /etc/shadow.json

Check Out: How To Fix the Upload Max File Size Issue In PHP On WordPress

Run in the background:

We can also run the service in the background using the below command.

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

Configure Auto-restart at boot:

We need to configure auto-restart the service when the system boots otherwise we will have to manually start it.

Create a file and put the command in this file and save it. 

sudo vim /etc/rc.local
sudo sslocal -c /etc/shadow.json -d start

Check Out: How To Enable Instant Articles To Monetize Your Contents

Configure The proxy on Browser:

Let’s configure it on the Firefox browser, Open the browser and look for “network settings“. 

shadowsocks ubuntu install

That’s it.

Share on:

I'm the founder of Curious Viral. I hope this blog will provide you complete information about Linux Technology & I would like to share my technical knowledge with you which I have learned during this period.

Other Posts You May Like...

Leave a comment