A shadowsocks account manager tool for multi user and traffic control.
Base on Node.js and SQLite.
For more details, you can see the wiki page.
Node.js 6.*
git clone https://github.com/shadowsocks/shadowsocks-manager.git
cd shadowsocks-manager
npm i
use node server.js
to run this program.
npm i -g shadowsocks-manager
use ssmgr
to run this program.
- Start shadowsocks with manager API, it supports
shadowsocks-python
andshadowsocks-libev
. For example, you can run this command:
ss-manager -m aes-256-cfb -u --manager-address 127.0.0.1:6001
- run ssmgr with type s:
config file:
type: s
shadowsocks:
address: 127.0.0.1:6001
manager:
address: 0.0.0.0:4001
password: '123456'
db: 'ss.sqlite'
If you want to use MySQL, the db
must like this:
db:
host: '1.1.1.1'
user: 'root'
password: 'abcdefg'
database: 'ssmgr'
And you have to close only_full_group_by
when the version of MySQL is greater than 5.7
command:
ssmgr -c /your/config/file/path.yml
- If you have several servers, you have to run step 1 and step 2 in every server.
The listening address in--manager-address
of step 1 and inshadowsocks -> address
of step 2's config file must be same. For security reseon, we recommend you to use127.0.0.1
instead of0.0.0.0
. - Now you can use the plugins to manage them. You can read the details in plugins readme page.
+-------------+ +-------------+ +------+
| Shadowsocks | | Shadowsocks | ... | |
| manager API | | manager API | | |
+-------------+ +-------------+ +------+
| | |
| | |
+-------------+ +-------------+ +------+
| ssmgr | | ssmgr | ... | |
| with type s | | with type s | | |
+-------------+ +-------------+ +------+
| | |
+------------+----+-------- ... ---+
|
|
+---------------+
| ssmgr plugins |
| with type m |
+---------------+
ssaccmgr --help
will show startup parameters info.
Usage: ssaccmgr [options]
Options:
-h, --help output usage information
-V, --version output the version number
-c, --config [file] config file, default: ~/.ssaccmgr/default.yml
-d, --db [file] sqlite3 file, sample: ~/.ssaccmgr/db.sqlite
-s, --shadowsocks [address] ss-manager address, sample: 127.0.0.1:6001
-m, --manager [address] manager address, sample: 0.0.0.0:6002
-p, --password [password] manager password, both server side and manager side must be equals
-r, --run [type] run shadowsocks from child_process, sample: libev / libev:aes-256-cfb / python / python:aes-256-cfb
--debug show debug message
First, ssaccmgr will read the config file in --config
, and other parameters(-detsmp
) will replace the config file values.