Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed Jun 14, 2024
2 parents 67bc9ef + 5e00a41 commit 4ab9ee9
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 4ab9ee9

Please sign in to comment.