add sspanelv3 interface, read the 'method' row

This commit is contained in:
BreakWa11 2016-06-12 17:41:05 +08:00
parent 51bd3fcea0
commit c7864acc37
4 changed files with 20 additions and 8 deletions

View file

@ -106,7 +106,7 @@ class ServerPool(object):
return False
return True
def new_server(self, port, password):
def new_server(self, port, password, user_config):
ret = True
port = int(port)
ipv6_ok = False
@ -117,6 +117,7 @@ class ServerPool(object):
return 'this port server is already running'
else:
a_config = self.config.copy()
a_config.update(user_config)
if len(a_config['server_ipv6']) > 2 and a_config['server_ipv6'][0] == "[" and a_config['server_ipv6'][-1] == "]":
a_config['server_ipv6'] = a_config['server_ipv6'][1:-1]
a_config['server'] = a_config['server_ipv6']
@ -145,6 +146,7 @@ class ServerPool(object):
return 'this port server is already running'
else:
a_config = self.config.copy()
a_config.update(user_config)
a_config['server_port'] = port
a_config['password'] = password
a_config['max_connect'] = 128