Skip to content

改动SSR服务端以支持群组和级别功能

批发靓鸡仔 edited this page May 31, 2017 · 2 revisions

需要修改的文件是switchrule.py

默认:
def getKeys(key_list):
return key_list
#return key_list + [‘plan’] # append the column name ‘plan’

def isTurnOn(row):
return True
#return row[‘plan’] == ‘B’ # then judge here

如上的
plan→g = 群组
plan→level = 级别

别忘了注释

示例 只允许群组1:
def getKeys(key_list):
#return key_list
return key_list + [‘g’] # append the column name ‘plan’

def isTurnOn(row):
#return True
return row[‘g’] == ‘1’ # then judge here

Clone this wiki locally