Shadowsocks: Regardless of whether it is an IT staff or a foreign trader, it is often found that some websites cannot be accessed. Android developers should have a deep understanding. The Android official website cannot be accessed, the API cannot be viewed, and many of the latest Android information cannot be known in time. This article teaches you a simple implementation method, which is to deploy Shadowsocks on the VPS. Here are the specific implementation steps:

First, buy the server

First need a VPS, here I use Vultr, can now pay with Alipay and WeChat.

  • 1. Registration:
Https://www.vultr.com
  • 2, recharge: Vultr can choose Alipay or WeChat to recharge, the minimum recharge of 10 dollars

3. After the recharge is completed, click Servers and click the plus sign in the upper right corner to add the server.

Then select the server location, configuration and system version, there is a URL you can test the download speed, select the appropriate server location according to the speed, if the package, choose 3.5 or 5 US dollars 2.5 US dollars is ipv6 is not recommended: 

For the system, choose CentOS7 and 

then choose the price. After you select the purchase in the lower right corner, you can leave the other options. Vultr will not deduct your money immediately after purchase. It is charged on an hourly basis. How long does it take to collect, you can stop it directly.

4. After the server purchase is completed, wait a few minutes. After creating it, click on it to see the details, remember the IP address, username and password.

Second, configure the server

  • 1, the first thing we have to do is to connect to the server, we need an ssh client to connect, I use putty here (the end of the tool attached to the download address), open the putty and enter the server’s ip address point open, then Enter the username and password (right mouse button is paste, right click and press Enter) to go to your remote server.
  • 2, install python, the installation process encounters Y / n all input Y (execute the following commands in order):Yum install python-setuptools
  • 3. Install pip and execute the following commands in sequence:Wget https://pypi.python.org/packages/source/p/pip/pip-1.3.1.tar.gz –no-check-certificate Tar -xzvf pip-1.3.1.tar.gz Cd pip-1.3.1python setup.py install
  • 4. Install Shadowsocks:Pip install shadowsocksSuccessfully installed shadowsocks-XXX appears to indicate successful installation
  • 5. Execute the following commands in order, create a new folder “shadowsocks” in the /etc directory, and then create a new file “config.json” in the shadowsocks folder:Mkdir /etc/shadowsocks Vi /etc/shadowsocks/config.jsonAfter entering the page that appears after the above command, it is equivalent to the notebook in Windows. The bottom line prompts us that the current file is new.

In this view, there are the following keys to remember “i”: press the i key on the keyboard, the bottom of the window shows “insert”, indicating that the current file can be edited. “Esc”: Press Esc to exit the edit mode after editing. “:”: A colon with a half-width, press the colon (half-width) on the keyboard in non-edit mode to enter the mode of the input command. “w”: Enter w in the command mode and press Enter. The bottom of the window displays “written”, indicating that the changes have been saved. “q”: Enter q in the command mode and press Enter to exit the current editor. 
The contents of config.json are as follows:

{
    "server": "0.0.0.0",
    "server_port": 8888,
    "password": "your_password",
    "timeout": 600,
    "method": "aes-256-cfb",
    "fast_open": false
}

“server”: The ip address of your Vultr server 
“server_port” and “password” can be set according to your own requirements. 
If you need to open multiple ports at the same time, the contents of config.json can be set as follows:

{
    "server": "0.0.0.0",
    "port_password": {
        "8888": "your_password1",
        "8889": "your_password2"
    },
    "timeout": 600,
    "method": "aes-256-cfb",
    "fast_open": false
}
  • 6. Launch Shadowsocks by executing the following command:
Ssserver -c /etc/shadowsocks/config.json -d start

To stop Shadowsocks execute the following command:

Ssserver -c /etc/shadowsocks/config.json -d stop
  • 7, set Shadowsocks boot from the start 
    of the following command to create a shadowsocks.service file:
Vi /etc/systemd/system/shadowsocks.service

The contents of shadowsocks.service are as follows:

[Unit]
Description=Shadowsocks
After=network.target

[Service]
Type=forking
PIDFile=/run/shadowsocks/server.pid
PermissionsStartOnly=true
ExecStartPre=/bin/mkdir -p /run/shadowsocks
ExecStartPre=/bin/chown root:root /run/shadowsocks
ExecStart=/usr/local/bin/ssserver --pid-file /var/run/shadowsocks/server.pid -c /etc/shadowsocks/config.json -d start
Restart=on-abort
User=root
Group=root
UMask=0027

[Install]
WantedBy=multi-user.target

Save and exit.

Next set the file permissions:

Chmod 755 /etc/systemd/system/shadowsocks.service

Start the service:

Systemctl start shadowsocks
Systemctl enable shadowsocks
  • 8. Open the configuration port (take 8888 and 8889 ports as an example):
Firewall-cmd --zone=public --add-port=8888/tcp --permanent
Firewall-cmd --zone=public --add-port=8889/tcp --permanent
Firewall-cmd --reload

Third, Final

Ok, at this point, the science online has been set up, you can now download the shadowsocks.json client to fill in the ip address, port number, and password in shadowsocks.json to go to the website you want.

If you have any questions, please contact QQ: 931003200

Putty Download Address:
Windows: https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html
MAC: https://putty-for-mac.soft32.com/
Shadowsocks client download address:

Windows   
Https://github.com/shadowsocks/shadowsocks-windows/releases  

Mac OS X   
https://github.com/shadowsocks/ShadowsocksX-NG/releases
  
Linux   
https://github.com/shadowsocks/shadowsocks-qt5/wiki/Installation  
Https://github.com/shadowsocks/shadowsocks-qt5/releases iOS   
Https://itunes.apple.com/app/apple-store/id1070901416?pt=2305194&ct=shadowsocks.org&mt=8   
https://github.com/shadowsocks/shadowsocks-iOS/releases  
Https://play.google.com/store/apps/details?id=com.github.shadowsocks   
Https://github.com/shadowsocks/shadowsocks-android/releases