One-Click Install Script for Shadowsocks Python Version

Applicable environments for this script:
Supported systems: CentOS 6, 7, Debian, Ubuntu
Memory requirement: ≥128M
Date: July 21, 2017

About this script:
One-click installation of the latest version of Python-based Shadowsocks.
Friendly reminder: If you have any questions, please refer to this “Shadowsocks Troubleshooting” article before asking.

Default configuration:
Server port: Set by yourself (if not set, the default is 8989)
Password: Set by yourself (if not set, the default is teddysun.com)
Encryption method: Set by yourself (if not set, the default is aes-256-gcm)
Note: The script creates a single-user configuration file by default. If you need to configure multiple users, after installation, manually modify the configuration file according to the tutorial example below and then restart.

Shadowsocks for Windows client download:
https://github.com/shadowsocks/shadowsocks-windows/releases

How to use:
Log in as the root user and run the following commands:

wget --no-check-certificate -O shadowsocks.sh https://raw.githubusercontent.com/teddysun/shadowsocks_install/master/shadowsocks.sh
chmod +x shadowsocks.sh
./shadowsocks.sh 2>&1 | tee shadowsocks.log

After the installation is complete, the script will prompt as follows:

Congratulations, Shadowsocks-python server install completed!
Your Server IP        :your_server_ip
Your Server Port      :your_server_port
Your Password         :your_password
Your Encryption Method:your_encryption_method

Welcome to visit:https://teddysun.com/342.html
Enjoy it!

Uninstallation method:
Log in as the root user and run the following command:

./shadowsocks.sh uninstall

Single-user configuration file example (revised on August 28, 2015):
Configuration file path: /etc/shadowsocks.json

{
    "server":"0.0.0.0",
    "server_port":your_server_port,
    "local_address":"127.0.0.1",
    "local_port":1080,
    "password":"your_password",
    "timeout":300,
    "method":"your_encryption_method",
    "fast_open": false
}

Example multi-user multi-port configuration file (revised on August 28, 2015):
Configuration file path: /etc/shadowsocks.json

{
    "server":"0.0.0.0",
    "local_address":"127.0.0.1",
    "local_port":1080,
    "port_password":{
         "8989":"password0",
         "9001":"password1",
         "9002":"password2",
         "9003":"password3",
         "9004":"password4"
    },
    "timeout":300,
    "method":"your_encryption_method",
    "fast_open": false
}

Commands used (revised on August 28, 2015):
Start: /etc/init.d/shadowsocks start
Stop: /etc/init.d/shadowsocks stop
Restart: /etc/init.d/shadowsocks restart
Status: /etc/init.d/shadowsocks status

One-click installation scripts for more versions of the Shadowsocks server:
ShadowsocksR
one-click installation script (CentOS, Debian, Ubuntu)

Shadowsocks-libev
one-click installation script for CentOS

Shadowsocks-libev
one-click installation script for Debian

Shadowsocks-go
one-click installation script (CentOS, Debian, Ubuntu)

Reference link:
https://teddysun.com/339.html

Update log:
(July 21, 2017)
1. Fixed: the default encryption method was changed from aes-256-cfb to aes-256-gcm (the official original client supports this encryption method);
2. Added: during installation, you can choose one of 16 encryption methods, as shown below:

aes-256-gcm
aes-192-gcm
aes-128-gcm
aes-256-ctr
aes-192-ctr
aes-128-ctr
aes-256-cfb
aes-192-cfb
aes-128-cfb
camellia-128-cfb
camellia-192-cfb
camellia-256-cfb
chacha20-ietf-poly1305
chacha20-ietf
chacha20
rc4-md5

(August 18, 2016)
1. Fixed: by default, the latest version of the master branch on Github is installed (currently
2.9.0).
2. Fixed: since the original author no longer updates the source code under pip, Shadowsocks is no longer installed via
pip; instead, the Github master
branch is downloaded for installation. If the version is upgraded after some time, simply uninstall it first and run this script again to upgrade to the latest version.

(May 12, 2016)
1. Added firewall rule configuration for CentOS 7.

(August 28, 2015)
1. Fixed the issue where the control script /etc/init.d/shadowsocks could not display
status on CentOS 7.

(August 1, 2015)
1. Added support for custom server ports (if not specified, the default port is 8989);

(March 10, 2015)
1. Added one-click installation for Debian and Ubuntu;

(January 21, 2015)
1. Fixed the configuration file to match the official sample;
2. Modified the startup script to use the official background start and stop commands.

(October 10, 2014)
Reported the multi-user, multi-port issue to the author, and the author has updated the Wiki page. This tutorial now includes a
sample configuration file for multi-user, multi-port setup.

(September 24, 2014)
How do you configure multiple users? See details: here
Note: Shadowsocks
already supports multiple users; simply add different ports in the configuration file, each corresponding to a different password.

(July 12, 2014)
1. Fixed an issue when obtaining the public IP. It is recommended not to use a
VPS with a shared public IP to set up a Shadowsocks service.

(May 29, 2014)
1. Added chkconfig configuration to enable the service command.
2. Changed the configuration file name from /etc/config.json to
/etc/shadowsocks.json (to match the official naming).
3. Added workers to the configuration file, with a default value of 1 (to stay in sync with the official configuration).

(May 27, 2014)
1. Fixed the issue where auto-start on boot did not work.
2. Optimized the logic for determining whether background startup was successful.

(May 4, 2014)
1. Fixed a bug in the logic for adding firewall ports: if port 8989
has already been allowed, there is no need to add it again.
2. Fixed a bug in the logic for obtaining the server IP: for multi-IP VPS
or servers, by default only the first public IP
is written to the configuration file (/etc/config.json).
3. Added auto-start on boot.

Leave a Comment

Your email address will not be published. Required fields are marked *

中文 EN
🚀

RedGate VPN

免费节点太挤太慢?
升级高速稳定专线

立即体验 →

告别卡顿

RedGate VPN
全球高速节点

免费下载 →
Scroll to Top