Build shadowsocks in CentOS in VPS
First, we will introduce several good VPS products:
- DigitalOcean
- Bricklayer
- Linode
Detailed operation instructions for Linode:
After the Linode account is bound to a credit card for activation, you can create VPS. It is worth noting that the control panel of Linode is more complex, and of course it comes along with more powerful functions. Select the package in "Linodes" and select the IDC location in the lower left corner. After the package is complete, you can see the assigned IP address and host name. Click the host name, for example, "123456 ", click "Deploy a Linux Distribution", select "CentOS 6.5" in "Distribution", and enter your Root Password in the "root Password" box, click the "Deploy" button below, and the creation will be completed in about 1 minute. Click the "Boot" button under "Dashboard" to start your VPS. After the startup is complete, you can use putty to operate your VPS. The default SSH port is 22.
The following command requires one line of execution. If one line of command is entered, press enter to execute the command. If no error is reported, that is, the execution is successful. If a confirmation prompt is displayed, enter y, press enter (each line of command can be copied, right-click and paste in putty, and press enter to execute)
# Yum install epel-release
# Yum update
# Yum install python-setuptools m2crypto supervisor
# Easy_install pip
# Pip install shadowsocks
# Vi/etc/shadowsocks. json
Press the I key to enter the editing mode. The "-INSERT-" icon appears in the lower left corner of the putty black box, and then copy the following content at a time (remember to modify 8388 and yourpassword for your own port number and password before copying, this port is not your SSH port number, but the port number of the server you set up to connect to the VPS on your mobile phone or the shadowsocks client on your computer. The port number ranges from 1 to 65535, as long as it does not conflict with the existing port number, such as the SSH port, you can write down the modified port number and password, which will be used later When configuring the mobile phone and computer client), right-click in putty, at this time, the copied content should have been pasted into putty.
---- The following content is the copied content ----
{ "server":"0.0.0.0", "server_port":8388, "local_port":1080, "password":"yourpassword", "timeout":600, "method":"aes-256-cfb"}
---- The above content is the copied content ----
After the copy is complete, Press Esc to exit the editing mode. The-INSERT-text in the lower-left corner of the putty black box disappears. Press: Key, enter wq, and press Enter, the file is saved and the vi editor is exited. (The ":" input method is "Shift + semicolon on the right of the letter L ")
Continue to execute the command
# Vi/etc/supervisord. conf
At this point, you should be able to see a lot of English content. Press the I key to enter the editing mode again. The "-INSERT-" icon will appear in the lower left corner of the putty black box, and adjust the cursor to the blank line at the end of the file with the direction key, copy the following content at a time, right-click the putty file, and paste the copied content to the putty file.
---- The following content is the copied content ----
[program:shadowsocks]command=ssserver -c /etc/shadowsocks.jsonautostart=trueautorestart=trueuser=rootlog_stderr=truelogfile=/var/log/shadowsocks.log
--- The above content is the copied content ---
After the copy is complete, press the Enter key to leave blank lines at the end of the file, and then press Esc to exit the editing mode. In this case, the "-INSERT-" text in the lower left corner of the putty black box disappears. Press: Key, enter wq, and press Enter, the file is saved and the vi editor is exited.
Continue to execute the command
# Echo "service supervisord start">/etc/rc. local
Add the command to the end of the file
Finally, execute the command
# Reboot
In this case, your VPS is restarted and the server has been fully configured. The putty dialog box indicating that the connection has been disconnected is displayed. Close the box (no error is reported ).
So far, the server of shadowsocks has been deployed. The rest is to download the client and install it on your mobile phone and computer. Remember to modify the client settings to keep them consistent with your server parameters.
Tips: Shadowsocks supports simultaneous use of one account on multiple terminals. Generally, it is unnecessary to configure multiple accounts. So if you don't understand it, you can leave it alone.
{ "server":"0.0.0.0", "port_password":{ "8388":"password1", "8389":"password2", "8390":"password3", "8391":"password4" }, "timeout":300, "method":"aes-256-cfb"}