Skip to content

Commit

Permalink
add udp-over-tcp
Browse files Browse the repository at this point in the history
  • Loading branch information
Toperlock committed Jul 3, 2024
1 parent 010e9d1 commit 872d16b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions parsers/clash2base64.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,8 @@ def clash2v2ray(share_link):
ss_info["max_streams"] = share_link['smux'].get('max-streams','')
ss_info["padding"] = share_link['smux'].get('padding','')
link += "&protocol={protocol}&max-connections={max_connections}&min-streams={min_streams}&max-streams={max_streams}&padding={padding}#{name}".format(**ss_info)
elif share_link.get("udp-over-tcp") == True:
link += "&uot=1#{name}".format(**ss_info)
else:
link += f"#{ss_info['name']}"
return link
Expand Down
5 changes: 5 additions & 0 deletions parsers/ss.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ def parse(data):
'password':None
}
flag = 0
if param.find('uot') > -1:
node["udp_over_tcp"] = {
'enabled': True,
'version': 2
}
if param.find('#') > -1:
if param[param.find('#') + 1:] != '':
remark = urllib.parse.unquote(param[param.find('#') + 1:])
Expand Down

0 comments on commit 872d16b

Please sign in to comment.