Browse Source

fix bug & update usage

dev
破娃酱 8 years ago
parent
commit
ccacef1556
  1. 12
      mujson_mgr.py

12
mujson_mgr.py

@ -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)
@ -198,14 +198,14 @@ Actions:
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:

Loading…
Cancel
Save