https://hceasy.com/2013/12/shadowsocks-%E6%9C%8D%E5%8A%A1%E7%AB%AF%E9%83%A8%E7%BD%B2/
In fact, there are already VPN and SSH on the server. VPN is a global proxy, which is not very convenient. SSH will be disconnected at critical times, and there is no good client on the mobile phone. Today, I suddenly saw the shadowsocks solution, which is more convenient, and it is IOS ANDROID Win linux is universal for all platforms. Simply make a backup.
Specific reference here
https://github.com/clowwindy/shadowsocks/wiki/Shadowsocks-%E4%BD%BF%E7%94%A8%E8%AF%B4%E6%98%8E
First check the Python version, it should be 2.6 or 2.7.
- python --version
- Python2.7.4
This ubuntu server usually has it.
Then the official website directly uses pip to install shadowsocks. Some people may have command errors and need to install something.
- apt-get install python-gevent python-pip
then you can
- pip install shadowsocks
Install shadowsocks.
The next configuration is also relatively simple,
create a new config.json, or any other name, the location can be placed under /etc/shadowsocks/ (there is no such file by default, you have to create one yourself), or home or other places.
content is
- {
- "server":"my_server_ip",
- "server_port":8388,
- "local_port":1080,
- "password":"barfoo!",
- "timeout":600,
- "method":"table"
- }
The specific meaning is also very clear on the wiki
- server server IP ( IPv4 / IPv6 ), note that this will also be the IP address the server is listening on
- server_port server port
- local_port local port
- password used to encrypt the password
- timeout timeout (seconds)
- method encryption method, you can choose "bf-cfb" , "aes-256-cfb" , "des-cfb" , "rc4" , etc. The default is an insecure encryption, "aes-256-cfb" is recommended
I only changed the encryption method and password. The encryption method is recommended to use bf-cfb, because the aes-256-cfb system does not seem to support it by default, and an error will be reported. If you want to support these encryption methods, you have to install
- apt-get install python-m2crypto
Then you can start the service.
- ssserver -c /etc/shadowsocks/config.json
Of course, you can't keep ssh open all the time, so still
- nohup ssserver -c /etc/shadowsocks/config.json > log &
Then you can turn off SSH.
Or more direct boot-up, add to rc.local
- /usr/local/bin/ssserver -c /etc/shadowsocks/config.json
Android phones can install " Shadow Shuttle " and configure it, and other phones can google by themselves.
More clients here
https://github.com/clowwindy/shadowsocks/wiki/Ports-and-Clients