fix bug & update usage
This commit is contained in:
parent
75643635d4
commit
ccacef1556
1 changed files with 18 additions and 18 deletions
|
@ -25,7 +25,7 @@ class MuJsonLoader(object):
|
||||||
self.json = json.loads(l)
|
self.json = json.loads(l)
|
||||||
|
|
||||||
def save(self, path):
|
def save(self, path):
|
||||||
if self.json:
|
if self.json is not None:
|
||||||
output = json.dumps(self.json, sort_keys=True, indent=4, separators=(',', ': '))
|
output = json.dumps(self.json, sort_keys=True, indent=4, separators=(',', ': '))
|
||||||
with open(path, 'a'):
|
with open(path, 'a'):
|
||||||
pass
|
pass
|
||||||
|
@ -107,7 +107,7 @@ class MuMgr(object):
|
||||||
up = {'enable': 1, 'u': 0, 'd': 0, 'method': "aes-128-ctr",
|
up = {'enable': 1, 'u': 0, 'd': 0, 'method': "aes-128-ctr",
|
||||||
'protocol': "auth_aes128_md5",
|
'protocol': "auth_aes128_md5",
|
||||||
'obfs': "tls1.2_ticket_auth_compatible",
|
'obfs': "tls1.2_ticket_auth_compatible",
|
||||||
'transfer_enable': 1125899906842624}
|
'transfer_enable': 9007199254740992}
|
||||||
up['passwd'] = self.rand_pass()
|
up['passwd'] = self.rand_pass()
|
||||||
up.update(user)
|
up.update(user)
|
||||||
|
|
||||||
|
@ -190,26 +190,26 @@ def print_server_help():
|
||||||
print('''usage: python mujson_manage.py -a|-d|-e|-c|-l [OPTION]...
|
print('''usage: python mujson_manage.py -a|-d|-e|-c|-l [OPTION]...
|
||||||
|
|
||||||
Actions:
|
Actions:
|
||||||
-a ADD add/edit a user
|
-a ADD add/edit a user
|
||||||
-d DELETE delete a user
|
-d DELETE delete a user
|
||||||
-e EDIT edit a user
|
-e EDIT edit a user
|
||||||
-c CLEAR set u/d to zero
|
-c CLEAR set u/d to zero
|
||||||
-l LIST display a user infomation or all users infomation
|
-l LIST display a user infomation or all users infomation
|
||||||
|
|
||||||
Options:
|
Options:
|
||||||
-u USER the user name
|
-u USER the user name
|
||||||
-p PORT server port
|
-p PORT server port (only this option must be set if add a user)
|
||||||
-k PASSWORD password
|
-k PASSWORD password
|
||||||
-m METHOD encryption method, default: aes-128-cfb
|
-m METHOD encryption method, default: aes-128-ctr
|
||||||
-O PROTOCOL protocol plugin, default: auth_sha1_v4
|
-O PROTOCOL protocol plugin, default: auth_aes128_md5
|
||||||
-o OBFS obfs plugin, default: tls1.2_ticket_auth_compatible
|
-o OBFS obfs plugin, default: tls1.2_ticket_auth_compatible
|
||||||
-G PROTOCOL_PARAM protocol plugin param
|
-G PROTOCOL_PARAM protocol plugin param
|
||||||
-g OBFS_PARAM obfs plugin param
|
-g OBFS_PARAM obfs plugin param
|
||||||
-t TRANSFER max transfer for G bytes, default: 1048576, can be float point number
|
-t TRANSFER max transfer for G bytes, default: 8388608 (8 PB or 8192 TB)
|
||||||
-f FORBID set forbidden ports. Example (ban 1~79 and 81~100): -f "1-79,81-100"
|
-f FORBID set forbidden ports. Example (ban 1~79 and 81~100): -f "1-79,81-100"
|
||||||
|
|
||||||
General options:
|
General options:
|
||||||
-h, --help show this help message and exit
|
-h, --help show this help message and exit
|
||||||
''')
|
''')
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue