wget -N --no-check-certificate https://raw.githubusercontent.com/aipeach/doubi/master/libsodium.sh && chmod +x libsodium.sh && bash libsodium.sh
apt update && apt install -y python3-pip libffi-dev libssl-dev git nano
git clone -b manyuser https://github.com/Anankke/shadowsocks-mod.git /root/shadowsocks
cd shadowsocks
pip3 install -r requirements.txt
cp apiconfig.py userapiconfig.py
cp config.json user-config.json
cp -r /root/shadowsocks/ssr.service /etc/systemd/system/
如需启动多个后端只需复制一份 ssr.service 改成不同文件名并修改 WorkingDirectory=
即可
cp -r /root/shadowsocks /root/aipeach
cp -r /root/shadowsocks/ssr.service /etc/systemd/system/aipeach.service
systemctl start ssr
systemctl enable ssr
echo "sshd: ALL" > /etc/hosts.allow
#防止 auto block 了自己无法连接 ssh
# Config
#面板对应的节点id
NODE_ID = 0
# hour,set 0 to disable
#测速默认6小时
SPEEDTEST = 6
#自动上报与下载封禁IP
CLOUDSAFE = 1
#自动封禁SS密码和加密方式错误的 IP
ANTISSATTACK = 0
#是否接受上级下发的命令
AUTOEXEC = 0
#单端口多用户混淆参数后缀,可以随意修改,但请保持前后端一致
MU_SUFFIX = 'zhaoj.in'
#单端口多用户混淆参数表达式
MU_REGEX = '%5m%id.%suffix'
SERVER_PUB_ADDR = '127.0.0.1' # mujson_mgr need this to generate ssr link
#对接方式,glzjinmod (数据库方式连接),modwebapi (webapi)
API_INTERFACE = 'modwebapi' # glzjinmod, modwebapi
# 面板站点地址,如果开启了 https 需要修改为https
WEBAPI_URL = 'https://zhaoj.in'
# .config.php里设置的对接口令
WEBAPI_TOKEN = 'glzjin'
# mudb
MUDB_FILE = 'mudb.json'
# Mysql
MYSQL_HOST = '127.0.0.1'
MYSQL_PORT = 3306
MYSQL_USER = 'ss'
MYSQL_PASS = 'ss'
MYSQL_DB = 'shadowsocks'
MYSQL_SSL_ENABLE = 0
MYSQL_SSL_CA = ''
MYSQL_SSL_CERT = ''
MYSQL_SSL_KEY = ''
# API
API_HOST = '127.0.0.1'
API_PORT = 80
API_PATH = '/mu/v2/'
API_TOKEN = 'abcdef'
API_UPDATE_TIME = 60
# Manager (ignore this)
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