forked from shadowsocks/shadowsocks
-
Notifications
You must be signed in to change notification settings - Fork 0
/
switchrule.py
28 lines (24 loc) · 942 Bytes
/
switchrule.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
from configloader import load_config, get_config
def getKeys():
key_list = ['id', 'port', 'u', 'd', 'transfer_enable', 'passwd', 'enable']
if get_config().API_INTERFACE == 'sspanelv3':
key_list += ['method']
elif get_config().API_INTERFACE == 'sspanelv3ssr':
key_list += ['method', 'obfs', 'protocol']
elif get_config().API_INTERFACE == 'glzjinmod':
key_list += ['method',
'obfs',
'obfs_param',
'protocol',
'protocol_param',
'id',
'node_speedlimit',
'forbidden_ip',
'forbidden_port',
'disconnect_ip',
'is_multi_user']
return key_list
# return key_list + ['plan'] # append the column name 'plan'
def isTurnOn(row):
return True
# return row['plan'] == 'B' # then judge here