以下是config.py内容:
import logging
Config
MYSQL_HOST = 'localhost'
MYSQL_PORT = 3306
MYSQL_USER = 'root'
MYSQL_PASS = '123456789a'
MYSQL_DB = 'sspanel'
MANAGE_PASS = 'aliyu4Seff'
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
PANEL_VERSION = 'V3' # V2 or V3. V2 not support API
API_URL = 'http://vps.demo.com/mu'
API_PASS = 'aliyu4Seff'
NODE_ID = '1'
CHECKTIME = 15
SYNCTIME = 600
BIND IP
if you want bind ipv4 and ipv6 '[::]'
if you want bind all of ipv4 if '0.0.0.0'
if you want bind all of if only '4.4.4.4'
SS_BIND_IP = '0.0.0.0'
SS_METHOD = 'rc4-md5'
LOG CONFIG
LOG_ENABLE = False
LOG_LEVEL = logging.DEBUG
LOG_FILE = '/var/log/shadowsocks.log'
其中 /var/log/shadowsocks.log中什么都没有。
以下是/home/www/ss-panel/.env 中的信息:
// ss-panel v3 ▒EM置
//
// !!! 修▒T▒此key为▒ZO▒\▒▒W符串确▒]▒Q▒Y▒I▒E▒ !!!
key = 'aliyu4Seff'
env = 'prod' // 正▒O▒N▒▒C请▒]▒LAenv为prod确▒~]▒I▒E▒
debug = 'false' // 正▒O▒N▒▒C请确▒]为false
appName = 'ss-panel3' //▒Y▒B▒▒PM称
baseUrl = 'http://vps.demo.com' // ▒Y▒B▒▒~\▒▒~]@
timeZone = 'PRC' // RPC 天▒~~]▒W▒▒W▒ UTC ▒| ▒▒^W▒W▒▒W▒
pwdMethod = 'md5' // ▒F▒| A▒J| ▒F ▒O▒▒~@I md5,sha256
salt = '' // ▒F▒| A▒J| ▒F▒T▒▒L▒N▒W▒▒IH▒MG级请▒UY空
theme = 'default' // 主▒X
// v3.4 ▒PN使▒T▒ session代▒[▒authDriver
// session,cache ▒O▒▒@I file/redis
session = 'file'
cache = 'file'
tokenDriver = 'db'
// mu key ▒T▒▒N▒| ▒▒Lss-go mu▒ZD请▒B
muKey = 'aliyu4Seff'
// ▒B▒件
mailDriver = 'mailgun' // mailgun #smtp▒M▒\▒▒T▒▒LA,▒E▒~[▒K▒U
// 注▒FL▒YP▒H▒,▒O天▒O个ip▒C▒注▒FL▒ZD次▒~U▒
ipDayLimit = '10'
// ▒B▒箱▒L▒A设置
emailVerifyEnabled = 'false' // ▒X▒▒P▒▒@▒P▒注▒FL▒W▒▒B▒箱▒L▒A (true:▒@▒P▒ faa
lse:▒E▒▒W▒)
emailVerifyCodeLength = '8' // ▒B▒箱▒L▒A代▒| A▒U▒度
emailVerifyTTL = '30' // ▒L▒A代▒| A▒~~I▒UH▒W▒▒W▒ ▒MU▒M▒HF▒R_
// ▒T▒▒H▒签▒H▒设置
checkinTime = '22' // 签▒H▒▒W▒▒ZT▒W▒▒W▒ ▒MU▒M▒O▒W▒
r
checkinMin = '93' // 签▒H▒▒~~@▒Q▒A▒GO ▒MU▒MMB
checkinMax = '97' // 签▒H▒▒~~@▒Z▒A▒G~O
//
defaultTraffic = '1' // ▒T▒▒H▒▒H]▒K▒A▒GO ▒MU▒MGB
// 注▒FL▒PN▒N▒▒W▒ZD▒B~@请▒| A▒U▒▒GO
inviteNum = '0'
// 记▒U▒A▒GO▒W▒▒W▒H▒dynamodb ,beta,请▒K▒▒~@▒~P▒
log_traffic_dynamodb = 'false'
database ▒U▒▒M▒▒S▒E~M置
db_driver = 'mysql'
db_host = 'localhost'
db_port = '3306'
db_database = 'sspanel'
db_username = 'root'
db_password = '123456789a'
db_charset = 'utf8'
db_collation = 'utf8_general_ci'
db_prefix = ''
redis
redis_scheme = 'tcp'
redis_host = '127.0.0.1'
redis_port = '6379'
redis_database = '0'
redis_pass = ''
mailgun
mailgun_key = ''
mailgun_domain = ''
mailgun_sender = ''
smtp
smtp_host = ''
smtp_username = ''
smtp_port = ''
smtp_name = ''
smtp_sender = ''
smtp_passsword = ''
smtp_ssl = 'true'
aws
aws_access_key_id = ''
aws_secret_access_key = ''
aws_region = 'ap-northeast-1'
aws_ses_region = 'us-east-1'
aws_ses_sender = ''
现在代理可以运行,可以翻墙(有点慢),vps用的是搬瓦工的年付$19.9,安装后内存占用
RAM: 155.46/256 MB
SWAP: 108.66/128 MB
但是ss-panel 无法统计流量、在线人数问题
安装时采用这个哥们的一键安装包:
使用代理时putty远程连接出现以下问题:
[root@localhost shadowsocks]# python servers.py
ERROR:root:[Errno 104] Connection reset by peer
WARNING:root:one time auth fail
WARNING:root:header is too short
ERROR:root:[1025]can not parse header when handling connection from 27.211.59.191:14094
Traceback (most recent call last):
File "../shadowsocks/tcprelay.py", line 328, in _handle_stage_addr
raise Exception('[%s]can not parse header'%(self._config['server_port']))
Exception: [1025]can not parse header
ERROR:root:[Errno 32] Broken pipe
ERROR:root:[Errno 104] Connection reset by peer
WARNING:root:timed out: maps.google.com:80
Traceback (most recent call last):
File "/root/shadowsocks-rm/shadowsocks/dbtransfer.py", line 197, in thread_push
DbTransfer.get_instance().push_db_all_user()
File "/root/shadowsocks-rm/shadowsocks/dbtransfer.py", line 98, in push_db_all_user
response = urllib2.urlopen(req)
File "/usr/lib64/python2.7/urllib2.py", line 154, in urlopen
return opener.open(url, data, timeout)
File "/usr/lib64/python2.7/urllib2.py", line 437, in open
response = meth(req, response)
File "/usr/lib64/python2.7/urllib2.py", line 550, in http_response
'http', request, response, code, msg, hdrs)
File "/usr/lib64/python2.7/urllib2.py", line 475, in error
return self._call_chain(_args)
File "/usr/lib64/python2.7/urllib2.py", line 409, in _call_chain
result = func(_args)
File "/usr/lib64/python2.7/urllib2.py", line 558, in http_error_default
raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
HTTPError: HTTP Error 500: Internal Server Error
WARNING:root:db thread except:HTTP Error 500: Internal Server Error
ERROR:root:[Errno 104] Connection reset by peer
WARNING:root:timed out: id.google.com.hk:443
ERROR:root:[Errno 104] Connection reset by peer
WARNING:root:unsupported addrtype 47, maybe wrong password or encryption method
ERROR:root:[1025]can not parse header when handling connection from 117.36.118.226:9368
Traceback (most recent call last):
File "../shadowsocks/tcprelay.py", line 328, in _handle_stage_addr
raise Exception('[%s]can not parse header'%(self._config['server_port']))
Exception: [1025]can not parse header
ERROR:root:[Errno 104] Connection reset by peer
WARNING:root:timed out: www.gstatic.com:443
ERROR:root:[Errno 104] Connection reset by peer
ERROR:root:[Errno 104] Connection reset by peer
WARNING:root:timed out: www.google.com.hk:443
ERROR:root:[Errno 111] Connection refused
注:整个过程(运行10分钟)多次出现(不下百次)
ERROR:root:[Errno 104] Connection reset by peer
这个错误,为了方便查看,基本只保留了少许的几条。中间流量统计同步时依旧出现
DbTransfer.get_instance().push_db_all_user()
这个错误。
那么问题来了,请问怎么解决 无法统计流量、在线人数问题?
@zuoruizhi