fix bug & update usage
@@ -25,7 +25,7 @@ class MuJsonLoader(object):
self.json = json.loads(l)
def save(self, path):
- if self.json:
+ if self.json is not None:
output = json.dumps(self.json, sort_keys=True, indent=4, separators=(',', ': '))
with open(path, 'a'):
pass
@@ -107,7 +107,7 @@ class MuMgr(object):
up = {'enable': 1, 'u': 0, 'd': 0, 'method': "aes-128-ctr",
'protocol': "auth_aes128_md5",
'obfs': "tls1.2_ticket_auth_compatible",
- 'transfer_enable': 1125899906842624}
+ 'transfer_enable': 9007199254740992}
up['passwd'] = self.rand_pass()
up.update(user)
@@ -198,14 +198,14 @@ Actions:
Options:
-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
- -m METHOD encryption method, default: aes-128-cfb
- -O PROTOCOL protocol plugin, default: auth_sha1_v4
+ -m METHOD encryption method, default: aes-128-ctr
+ -O PROTOCOL protocol plugin, default: auth_aes128_md5
-o OBFS obfs plugin, default: tls1.2_ticket_auth_compatible
-G PROTOCOL_PARAM protocol 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"
General options:
