Install Shadowsocks and automatically start in Ubuntu

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

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

{
    "server":"11.22.33.44",
    "server_port":50003,
    "local_port":1080,
    "password":"123456",
    "timeout":600,
    "method":"aes-256-cfb"
}

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

sslocal -c /home/username/shadowsocks.json

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

Configure Browser

Install SwitchyOmega

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

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.

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.

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.

发表评论

电子邮件地址不会被公开。 必填项已用*标注

16 − 8 =

− 1 = 2