Coder Social home page Coder Social logo

iclxl / shadowsocks-manager Goto Github PK

View Code? Open in Web Editor NEW

This project forked from shadowsocks/shadowsocks-manager

0.0 1.0 0.0 13.93 MB

A shadowsocks manager tool for multi user and traffic control.

Home Page: https://shadowsocks.github.io/shadowsocks-manager/

License: GNU General Public License v3.0

JavaScript 69.57% HTML 29.84% CSS 0.42% Dockerfile 0.17%

shadowsocks-manager's Introduction

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.

WebGUI Demo:

https://shadowghost.app

FreeAccount Demo:

https://free.gyteng.com

Dependencies

  • Node.js 10.*
  • 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.

Telegram Group

Join the group if you have some problem: https://t.me/ssmgr

VPS recommendation

Donate

If you find this project helpful, please consider making a donation:

  • Alipay

  • WeChat Pay

shadowsocks-manager's People

Contributors

gyteng avatar llc1123 avatar gadflysu avatar t123yh avatar hklcf avatar ken-tam avatar chaozhang123 avatar evanren avatar teddysun avatar renjie45 avatar methol avatar lokisama avatar onlymash avatar aipsel avatar ernix avatar liruqi avatar jimages avatar chaostop avatar blackfoxsar avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.