• Stars
    star
    4,106
  • Rank 10,060 (Top 0.3 %)
  • Language
    JavaScript
  • License
    GNU General Publi...
  • Created over 9 years ago
  • Updated 2 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A shadowsocks manager tool for multi user and traffic control.

NPM version npm license

shadowsocks-manager

A shadowsocks manager tool for multi user and traffic control.
Base on Node.js and SQLite.

For more details, you can see docs.

If you want to use the old version, please switch to this branch.

Dependencies

  • Node.js 12.*
  • Redis

Install

From source:

git clone https://github.com/shadowsocks/shadowsocks-manager.git
cd shadowsocks-manager
npm i

use node server.js to run this program.

From npm:

npm i -g shadowsocks-manager

You may need to use the --unsafe-perm flag if you receive an permission error

npm i -g shadowsocks-manager --unsafe-perm

use ssmgr to run this program.

From docker:

docker run --name ssmgr -idt -v ~/.ssmgr:/root/.ssmgr --net=host gyteng/ssmgr [ssmgr params...]

Build docker image:

here is the Dockerfile

FROM ubuntu:18.04
MAINTAINER gyteng <[email protected]>
RUN apt-get update && \
    export DEBIAN_FRONTEND=noninteractive && \
    apt-get install tzdata iproute2 curl git sudo software-properties-common python-pip -y && \
    pip install git+https://github.com/shadowsocks/shadowsocks.git@master && \
    curl -sL https://deb.nodesource.com/setup_8.x | bash - && \
    apt-get install -y nodejs shadowsocks-libev && \
    npm i -g shadowsocks-manager --unsafe-perm && \
    echo "Asia/Shanghai" > /etc/timezone && \
    rm /etc/localtime && \
    dpkg-reconfigure -f noninteractive tzdata
CMD ["/usr/bin/ssmgr"]

Usage

  1. Start shadowsocks with manager API, it supports shadowsocks-python and shadowsocks-libev. For example, you can run this command:
ss-manager -m aes-256-cfb -u --manager-address 127.0.0.1:6001
 or
ssserver -m aes-256-cfb -p 12345 -k abcedf --manager-address 127.0.0.1:6001
  1. 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

  1. 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 in shadowsocks -> address of step 2's config file must be same. For security reseon, we recommend you to use 127.0.0.1 instead of 0.0.0.0.
  2. 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  |
             +---------------+

Plugins

telegram
freeAccount
webgui

Parameter

ssmgr --help will show startup parameters info.

Usage: ssmgr [options]

  Options:

    -h, --help                   output usage information
    -V, --version                output the version number
    -c, --config [file]          config file, default: ~/.ssmgr/default.yml
    -d, --db [file]              sqlite3 file, sample: ~/.ssmgr/db.sqlite
    -t, --type [type]            type, s for server side, m for manager side
    -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, ssmgr will read the config file in --config, and other parameters(-detsmp) will replace the config file values.

Translate

If your want to help to translate it to other languages, please edit files here and give me a pull request.

More Repositories

1

shadowsocks-windows

A C# port of shadowsocks
C#
57,941
star
2

shadowsocks-android

A shadowsocks client for Android
Kotlin
34,644
star
3

shadowsocks

Python
33,505
star
4

ShadowsocksX-NG

Next Generation of ShadowsocksX
Swift
32,168
star
5

shadowsocks-iOS

Removed according to regulations.
Objective-C
8,195
star
6

shadowsocks-qt5

A cross-platform shadowsocks GUI client
C++
7,952
star
7

shadowsocks-rust

A Rust port of shadowsocks
Rust
7,758
star
8

shadowsocks-go

go port of shadowsocks (Deprecated)
Go
6,620
star
9

ChinaDNS

Protect yourself against DNS poisoning in China.
C
3,565
star
10

openwrt-shadowsocks

Shadowsocks-libev for OpenWrt/LEDE
Makefile
3,227
star
11

v2ray-plugin

A SIP003 plugin based on v2ray
Go
2,611
star
12

simple-obfs

A simple obfuscating tool (Deprecated)
C
2,344
star
13

shadowsocks-gui

Shadowsocks GUI client
CoffeeScript
2,005
star
14

libQtShadowsocks

A lightweight and ultra-fast shadowsocks library written in C++14 with Qt framework
C++
1,492
star
15

shadowsocks-nodejs

CoffeeScript
1,244
star
16

luci-app-shadowsocks

OpenWrt/LEDE LuCI for Shadowsocks-libev
Lua
1,133
star
17

shadowsocks-org

www.shadowsocks.org
HTML
823
star
18

ChinaDNS-Python

Protect yourself against DNS poisoning in China.
Python
766
star
19

shadowsocks-chromeapp

Chrome client for shadowsocks
CoffeeScript
693
star
20

kcptun-android

kcptun for Android.
Shell
564
star
21

simple-obfs-android

A simple obfuscating tool for Android
C
433
star
22

v2ray-plugin-android

A SIP003 V2ray plugin on Android
Kotlin
425
star
23

crypto2

The fastest cryptographic library in the galaxy
Rust
344
star
24

ShadowDNS

A DNS forwarder using Shadowsocks as the server
Python
333
star
25

papers

List of papers related to shadowsocks
210
star
26

shadowsocks-dotcloud

a port of shadowsocks via websockets protocol, able to tunnel through HTTP proxy
CoffeeScript
200
star
27

shadowsocks-hub

A web app managing shadowsocks users, servers, nodes, products, accounts, and traffic. Suitable for internal use by companies, organizations, and friends.
JavaScript
130
star
28

qtun

Yet another SIP003 plugin based on IETF-QUIC
Rust
115
star
29

shadow-shop

Building highly customizable e-commerce websites selling shadowsocks services, using Wordpress and WooCommerce
PHP
104
star
30

tun2socks-iOS

tun2socks as a library for iOS apps
94
star
31

Shadowsocks-Net

✈ A light-weight, cross-platform, extensible Shadowsocks developed in C# (.NET Core).
C#
89
star
32

shadowsocks-restful-api

Secure, reliable, standard restful api for managing shadowsocks-libev
JavaScript
79
star
33

stackscript

Shell
72
star
34

libsscrypto

Build libsscrypto.dll for shadowsocks-windows.
C
59
star
35

iptables

iptables is the userspace command line program used to configure the Linux 2.4.x and later packet filtering ruleset. It is targeted towards system administrators.
C
54
star
36

openwrt-feeds

OpenWrt/LEDE feeds
Makefile
52
star
37

shadowsocks-crypto

Shadowsocks Crypto
Rust
39
star
38

libev

A fork of libev
Shell
34
star
39

sysproxy

System Proxy Agent for Shadowsocks Windows
C
30
star
40

shadowsocks-hub-api

A set of open and standard restful APIs for managing shadowsocks users, servers, nodes, products, accounts, and traffic.
JavaScript
25
star
41

openssl-android

A fork of OpenSSL for shadowsocks-android
C
25
star
42

tun2socks

Rust
22
star
43

android-ndk-go

Circle CI Android image with NDK and golang + rust, for building golang and/or rust for NDK.
Dockerfile
18
star
44

libudns

A fork of libudns
C
11
star
45

overture-android

A wrapper of overture for shadowsocks-android
Shell
8
star
46

tls

TLS version 1.3
Rust
6
star
47

iana-ip-db

IANA IP Number Resources
Rust
3
star