Skip to content

Commit 81de4f4

Browse files
committed
移除无效的ss加密方法
1 parent f359efb commit 81de4f4

File tree

3 files changed

+10
-8
lines changed

3 files changed

+10
-8
lines changed

v2ray_util/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
__version__ = '3.9.0.2'
1+
__version__ = '3.9.1'
22

33
import sys
44
if "xray" in sys.argv[0]:

v2ray_util/config_modify/ss.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,15 @@ def get_method(self):
1717
for index, method in enumerate(self.method_tuple):
1818
print ("{}.{}".format(index + 1, method))
1919
choice = readchar(_("please select shadowsocks method:"))
20-
choice = int(choice)
21-
if choice < 0 or choice > len(self.method_tuple):
22-
print(_("input out of range!!"))
23-
exit(-1)
20+
if choice:
21+
choice = int(choice)
22+
if choice < 0 or choice > len(self.method_tuple):
23+
print(_("input out of range!!"))
24+
exit(-1)
25+
else:
26+
return self.method_tuple[choice - 1]
2427
else:
25-
return self.method_tuple[choice - 1]
28+
exit(-1)
2629

2730
def get_password(self):
2831
random_pass = ''.join(random.sample(string.ascii_letters + string.digits, 16))

v2ray_util/util_core/utils.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,7 @@ def header_type_list():
7676
return ("none", "srtp", "utp", "wechat-video", "dtls", "wireguard")
7777

7878
def ss_method():
79-
return ("aes-256-cfb", "aes-128-cfb", "chacha20",
80-
"chacha20-ietf", "aes-256-gcm", "aes-128-gcm", "chacha20-poly1305")
79+
return ("aes-256-gcm", "aes-128-gcm", "chacha20-poly1305")
8180

8281
def xtls_flow():
8382
return ("", "xtls-rprx-origin", "xtls-rprx-direct")

0 commit comments

Comments
 (0)