Coder Social home page Coder Social logo

shadowsocks-py-mu's Introduction

About shadowsocks-python manyuser

This is a multi-user version of shadowsocks-python. Requires a mysql database or a panel which supports SS MU API.

Install instruction for database user

  1. install MySQL Server 5.x.x
  2. install cymysql library by pip install cymysql
  3. create a database named shadowsocks
  4. import shadowsocks.sql into shadowsocks
  5. copy config_example.py to config.py and edit it following the notes inside (but DO NOT delete the example file). You do not need to edit the API section.
  6. TestRun cd shadowsocks && python servers.py (not server.py)

Install instruction for MU API user

  1. install a panel which supports MU API (the known one is SS-Panel V3)
  2. copy config_example.py to config.py and edit it following the notes inside (but DO NOT delete the example file). You do not need to edit the MySQL Database section.
  3. TestRun cd shadowsocks && python servers.py (not server.py)

Install Instructions for Docker User

  1. build the docker: docker build -t shadowsocks-mu .

  2. create a config file as above

  3. run the docker (random free ports will be allocated): docker run -v /PATH/TO/CONFIG/FILE:/shadowsocks/shadowsocks/config.py -p PORT_START-PORT_END shadowsocks-mu

    [OR] to use fixed ports: docker run -v /PATH/TO/CONFIG/FILE:/shadowsocks/shadowsocks/config.py -p PORT_START-PORT_END:PORT_START-PORT_END shadowsocks-mu

    Reminder: /PATH/TO/CONFIG/FILE should be an absolute path

Reminders for Windows User

  1. install pyuv by pip install pyuv
  2. if git is not configured in your %PATH% environmental variable, you can create a file named .nogit to avoid using git describe

if no exception thown the server will startup. By default logging is enabled. You should be able to see this kind of thing in shadowsocks.log(default log file name)

Jun 24 01:06:08 INFO -----------------------------------------
Jun 24 01:06:08 INFO Multi-User Shadowsocks Server Starting...
Jun 24 01:06:08 INFO Current Server Version: 3.1.0-1-gc2ac618

Jun 24 01:10:11 INFO api downloaded
Jun 24 01:10:13 INFO api skipped port 443
Jun 24 01:10:13 INFO Server Added:   P[XXXXX], M[rc4-md5], E[[email protected]]
Jun 24 01:10:13 INFO Server Added:   P[XXXXX], M[rc4-md5], E[[email protected]]

Explanation of the log output

When adding server:

P[XXX] client port (assigned by database)

M[XXX] client encryption method

E[XXX] client email address

When data connection being established/blocked

U[XXX] client port (assigned by database)

RP[XXX] remote port (the port the client wants to connect)

A[XXX-->XXX] from the client address to the remote address

Database user table column

passwd server pass

port server port

t last connecting time

u no usage for this version of shadowsocks (kept at 0) but essential for some panels

d upload + download transfer

method encryption method

transfer_enable if u + d > transfer_enable this server will be stop (method del_server_out_of_bound_safe in dbtransfer.py)

Compatibility with other frontend UIs

It is fully compatible (SS MU API) with ss-panel V3.

Open source license

This program is licensed under Apache License 2.0

shadowsocks-py-mu's People

Contributors

clowwindy avatar fsgmhoward avatar mengskysama avatar zuoruizhi avatar shell909090 avatar nekolab avatar fa08c avatar felixonmars avatar v3aqb avatar humiaozuzu avatar zh-liang-cn avatar jlund avatar coderfox avatar xe0n0 avatar sybblow avatar sky-chen avatar peterfyj avatar mitnk avatar lazybios avatar henryhuang avatar est avatar everplays avatar made-by-love avatar jackyyf avatar phuslu avatar kimw avatar dreampuf avatar cicku avatar wb14123 avatar forest2087 avatar

Stargazers

 avatar

Watchers

James Cloos avatar SmRiley avatar

Forkers

lovese domainvip

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.