Skip to content
This repository was archived by the owner on Jan 30, 2023. It is now read-only.

Commit 90f2e8e

Browse files
authored
Merge pull request #19 from coiby/patch-1
修正path解析问题
2 parents 15f5bf4 + 4b6143a commit 90f2e8e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

v2rayL-GUI/sub2conf_api.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def b642conf(self, prot, tp, b64str):
5050
:return:
5151
"""
5252
if prot == "vmess":
53-
ret = ast.literal_eval(parse.unquote(base64.b64decode(b64str).decode()))
53+
ret = json.loads(parse.unquote(base64.b64decode(b64str).decode()).replace("\'", "\""))
5454
region = ret['ps']
5555

5656
elif prot == "shadowsocks":
@@ -318,4 +318,4 @@ def __init__(self, *args):
318318
# # t = base64.b64decode("ewoidiI6ICIyIiwKInBzIjogIjIzM3YyLmNvbV8xNDIuOTMuNTAuNzgiLAoiYWRkIjogIjE0Mi45My41MC43OCIsCiJwb3J0IjogIjM5Mzk4IiwKImlkIjogIjc1Y2JmYzI0LTZhNjAtNDBmMC05Yjc2LTUyMTlmNTIwYTJlMCIsCiJhaWQiOiAiMjMzIiwKIm5ldCI6ICJrY3AiLAoidHlwZSI6ICJ1dHAiLAoiaG9zdCI6ICIiLAoicGF0aCI6ICIiLAoidGxzIjogIiIKfQo=").decode().strip()
319319
# # print(t)
320320
#
321-
# b642conf("ss", "YWVzLTI1Ni1jZmI6NTQxNjAzNDY2QDE0Mi45My41MC43ODo5ODk4#ss")
321+
# b642conf("ss", "YWVzLTI1Ni1jZmI6NTQxNjAzNDY2QDE0Mi45My41MC43ODo5ODk4#ss")

0 commit comments

Comments
 (0)