add auth_sha1_v3, remove tls1.0_session_auth

This commit is contained in:
破娃酱 2016-08-31 18:04:52 +08:00
parent 1fe6e89c07
commit e81f8db0b8
3 changed files with 240 additions and 155 deletions

View file

@ -92,7 +92,7 @@ class MuMgr(object):
def add(self, user):
up = {'enable': True, 'u': 0, 'd': 0, 'method': "aes-128-cfb",
'protocol': "auth_sha1_v2_compatible",
'protocol': "auth_sha1_v3_compatible",
'obfs': "tls1.2_ticket_auth_compatible",
'transfer_enable': 1125899906842624}
up['passwd'] = self.rand_pass()
@ -206,17 +206,32 @@ def main():
fast_set_obfs = {'0': 'plain',
'1': 'http_simple_compatible',
'-1': 'http_simple',
'2': 'http_post_compatible',
'-2': 'http_post',
'3': 'tls1.2_ticket_auth_compatible',
'-3': 'tls1.2_ticket_auth'}
'2': 'tls1.2_ticket_auth_compatible',
'-2': 'tls1.2_ticket_auth'}
fast_set_protocol = {'0': 'origin',
'1': 'verify_sha1_compatible',
'-1': 'verify_sha1',
'2': 'auth_sha1_compatible',
'-2': 'auth_sha1',
'3': 'auth_sha1_v2_compatible',
'-3': 'auth_sha1_v2'}
'-3': 'auth_sha1_v2',
'4': 'auth_sha1_v3_compatible',
'-4': 'auth_sha1_v3'}
fast_set_method = {'a0': 'aes-128-cfb',
'a1': 'aes-192-cfb',
'a2': 'aes-256-cfb',
'r': 'rc4-md5',
'r6': 'rc4-md5-6',
'c': 'chacha20',
'ci': 'chacha20-ietf',
's': 'salsa20',
'b': 'bf-cfb',
'm0': 'camellia-128-cfb',
'm1': 'camellia-192-cfb',
'm2': 'camellia-256-cfb',
'a0t': 'aes-128-ctr',
'a1t': 'aes-192-ctr',
'a2t': 'aes-256-ctr'}
try:
optlist, args = getopt.getopt(sys.argv[1:], shortopts, longopts)
for key, value in optlist:
@ -251,7 +266,10 @@ def main():
elif key == '-G':
user['protocol_param'] = value
elif key == '-m':
user['method'] = value
if value in fast_set_method:
user['method'] = fast_set_method[value]
else:
user['method'] = value
elif key == '-f':
user['forbidden_port'] = value
elif key == '-t':