Skip to content

Commit

Permalink
Update socks.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Toperlock authored Nov 10, 2023
1 parent 819c294 commit 439812b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions parsers/socks.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,15 @@ def parse(data):
info = data[:]
server_info = urlparse(info)
node = {
'tag': unquote(server_info.fragment) or tool.genName()+'socks',
'tag': unquote(server_info.fragment) or tool.genName()+'_socks',
'type': 'socks',
"version": "5",
'udp_over_tcp': {}
}
netloc = (tool.b64Decode(server_info.netloc)).decode()
try:
netloc = (tool.b64Decode(server_info.netloc)).decode()
except:
netloc = server_info.netloc
if '@' in netloc:
_netloc = netloc.split("@")
node['server'] = re.sub(r"\[|\]", "", _netloc[1].rsplit(":", 1)[0])
Expand Down

0 comments on commit 439812b

Please sign in to comment.