Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Toperlock committed Jun 13, 2024
1 parent 4831145 commit 5e00a41
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,10 @@ def is_ip(str):
return re.search(r'^\d+\.\d+\.\d+\.\d+$',str)

def get_protocol(s):
m = re.search(r'^(.+?)://', s)
try:
m = re.search(r'^(.+?)://', s)
except Exception as e:
return None
if m:
if m.group(1) == 'hy2':
s = re.sub(r'^(.+?)://', 'hysteria2://', s)
Expand All @@ -221,7 +224,6 @@ def get_protocol(s):
s = re.sub(r'^(.+?)://', 'socks://', s)
m = re.search(r'^(.+?)://', s)
return m.group(1)
return None

def checkKeywords(keywords,str):
if not keywords:
Expand Down

0 comments on commit 5e00a41

Please sign in to comment.