Skip to content

Commit

Permalink
增加直接处理base64内容,不需要远程链接
Browse files Browse the repository at this point in the history
  • Loading branch information
Toperlock authored Nov 6, 2023
1 parent 1670a49 commit 924b160
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,19 @@ def get_nodes(url):
if url.startswith('sub://'):
url = tool.b64Decode(url[6:]).decode('utf-8')
urlstr = urllib.parse.urlparse(url)
if '://' not in url:
try:
content = tool.b64Decode(url).decode('utf-8')
data = parse_content(content)
processed_list = []
for item in data:
if isinstance(item, tuple):
processed_list.extend([item[0], item[1]]) # 处理shadowtls
else:
processed_list.append(item)
return processed_list
except:
return None
if not urlstr.scheme:
content = get_content_form_file(url)
else:
Expand Down

0 comments on commit 924b160

Please sign in to comment.