This website requires JavaScript.

Shadowsocks多用户管理平台

本文讲解在Archlinux中架设Shadowsocks多用户管理平台的方法。

安装Python环境

pip install cymysql shadowsocks m2crypto

安装shadowsocks服务后台

下载源码

git clone -b manyuser https://github.com/mengskysama/shadowsocks.git
cd /root/shadowsocks/shadowsocks

创建shadowsocks数据库

create database shadowsocks; --创建数据库
CREATE USER ss@localhost IDENTIFIED BY 'ss';  --创建WP用户和密码
GRANT ALL PRIVILEGES ON shadowsocks.* TO ss@localhost; --授予权限
FLUSH PRIVILEGES;  --刷新配置
GRANT ALL ON shadowsocks.* TO aa@'%' IDENTIFIED BY 'sa';

导入后台配置

use shadowsocks;
source /root/shadowsocks/shadowsocks/shadowsocks.sql
flush privileges;
exit;

修改Config.py

#Config
MYSQL_HOST = 'mdss.mengsky.net'
MYSQL_PORT = 3306
MYSQL_USER = 'ss'
MYSQL_PASS = 'ss'
MYSQL_DB = 'shadowsocks'
MANAGE_PASS = 'ss233333333'
#if you want manage in other server you should set this value to global ip
MANAGE_BIND_IP = '127.0.0.1'
#make sure this port is idle
MANAGE_PORT = 23333

安装shadowsocks前台

git clone https://github.com/orvice/ss-panel.git
curl -sS https://getcomposer.org/installer | php
php composer.phar  install

修改配置

cd ss-panel/lib/
cp config-simple.php config.php
vim config.php

修改数据库等信息

-- 登陆Mysql ,执行前台的SQL
use shadowsocks;
source /root/ss-panel/sql/invite_code.sql
source /root/ss-panel/sql/ss_user_admin.sql
source /root/ss-panel/sql/ss_node.sql
source /root/ss-panel/sql/ss_reset_pwd.sql
source /root/ss-panel/sql/user.sql
flush privileges;
exit

执行服务

nohup python2.7  /root/shadowsocks/shadowsocks/server.py > /var/log/shadowsocks.log 2>&1

#查看日志
cat /var/log/shadowsocks.log

#如果出现以下文字,则表明执行成功。
db start server at port [%s] pass [%s]

#将前端文件移至web目录, 通过浏览器访问即可。
cp -rd /root/ss-panel/* /var/www/html
0条评论
avatar