Install Shadowsocks and automatically start in Ubuntu

Contents
[隐藏]

1.Install Shadowsocks in Ubuntu

Install pip tool

sudo apt-get update

sudo apt-get install python-pip

sudo apt-get install python-setuptools m2crypto

Then install shadowsocks

pip install shadowsocks

2.Start Shadowsocks

Use sslocal --help to get help.

Create a new file in a folder (any folder would be ok, but /home/username/ path is recommended).

cd /home/username username is your username, you should change it to yours.

vim shadowsocks.json

After establishing configuration file, the next to do is to start shadowsocks service.

sslocal -c /home/username/shadowsocks.json

3.Automatically Start Shadowsocks Service

sudo vi /etc/rc.local

Add the following lines above exit 0 line in rc.local file.

# Automatically start Shadowsocks client
/usr/bin/python /usr/bin/sslocal -c /home/chengkai/shadowsocks.json

4.Configure Browser

4.1.Install SwitchyOmega

Download the latest release: https://github.com/FelisCatus/SwitchyOmega/releases/. Open chrome://extensions/ and install SwitchyOmega.

4.2.Set Proxy Address

Open SwitchyOmega settings, and click New profile in the left side. Give profile a name and select Proxy Profile as the type of profile. Finally, click Create to create a new profile. Select SOCKS5 as protocol, Server is 127.0.0.1, port is 1080. Save to apply all of the options.

4.3.Set Auto-Switch

Click auto switch in the left side and choose the profile that we just created (illustrated in the following figure).

Rule List URL: https://raw.githubusercontent.com/gfwlist/gfwlist/master/gfwlist.txt

And click Download Profile Now.

4.4.Start SwithyOmega

Click SwithyOmega icon on the up right corner of Chrome browser, and select auto switch. Try to open www.google.com to see whether you can visit google.com or not.

分享到:

发表评论