Build Shadowsocks server under Ubuntu

I recently bought a server on a cloud, and the price is quite reasonable. By the way, I built a shadowsock server on it, and summarized the construction process and the pits encountered.
The main reference is to the article in this link http://blog.021xt.cc/archives/98
Ubuntu1604 Server deployment
First of all, you need to ensure that python has been installed in the system. Use the following command
$ python –version
Python 2.6.8

If it is not installed, use sudo apt-get install python to install python.
Next, install shadowsocks, use the following command
$ pip install shadowsocks

Next, start configuring the Server. The main thing is to configure a .json file.
The file can be placed under /etc/shadowsocks.json.
For a single user, the configuration file is as follows.

{
    "server":"my_server_ip",
    "server_port":8388,
    "local_address": "127.0.0.1",
    "local_port":1080,
    "password":"mypassword",
    "timeout":300,
    "method":"aes-256-cfb",
    "fast_open": false
}

I encountered a pit here. After the configuration, it has been unable to use. Later, I found that the server_port corresponding to the purchased server is not open, and the server configuration on a certain cloud will solve it.
There is also server IP. I don't know why writing the IP address has been useless. After a search,
the sentence should be "server"="::".

multiuser config
{
"server": "0.0.0.0",
"port_password": {
"8381": "foobar1",
"8382": "foobar2",
"8383": "foobar3",
"8384": "foobar4"
},
"timeout": 300,
"method": "aes-256-cfb"
}
Also make sure that the corresponding port on the server you bought is open.

Some commands about shadowsocks
Foreground running command:
ssserver -c /etc/shadowsocks.json
Background running command:
ssserver -c /etc/shadowsocks.json -d start
ssserver -c /etc/shadowsocks.json -d stop

The output log is as follows:

2017-01-30 14:52:59 INFO connecting s2.googleusercontent.com:443 from 59.172.28.64:37629
2017-01-30 14:52:59 INFO connecting s2.googleusercontent.com:443 from 59.172.28.64:37627
2017-01-30 14:52:59 INFO connecting s2.googleusercontent.com:443 from 59.172.28.64:37626
2017-01-30 14:52:59 INFO connecting s2.googleusercontent.com:443 from 59.172.28.64:37625
2017-01-30 14:52:59 INFO connecting s2.googleusercontent.com:443 from 59.172.28.64:37630
2017-01-30 14:52:59 INFO connecting s2.googleusercontent.com:443 from 59.172.28.64:37628
2017-01-30 14:57:45 WARNING timed out: shadowsocks.org:443
2017-01-30 14:58:46 INFO connecting clients4.google.com:443 from 59.172.28.64:37979
2017-01-30 14:59:33 INFO connecting clients4.google.com:443 from 59.172.28.64:38113
2017-01-30 14:59:40 INFO connecting mtalk.google.com:5228 from 59.172.28.64:38130

Boot configuration, add
#start the shadowsocks server to /etc/rc.local
sudo ssserver -c /etc/shadowsocks.json -d start

The next step is that after the Client configuration
Server service is started, the SS Client can be installed and used on the client.
SS currently supports Windows, MAC, Linux, AndroidIOS and many other platforms. Reference: https://shadowsocks.org/en/download/clients.html

Windows: Shadowsocks-win Recommended for
MAC: ShadowsocksX-NG and shadowsocks-iOS

Android: Shadowsocks Chinese name: Shadowsock
IOS: MobileShadowSocks and Potatso

The client configuration interface on Windows looks like this

write picture description here
It is enough to fill in the configuration of the server shadowsocks.json accordingly.
After the configuration is complete, you need to check the Enable System Proxy
write picture description here
OK , now the shadowsocks server and client have been set up.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325579025&siteId=291194637