Skip to content

Commit e71597a

Browse files
committed
chore: check obfs-password if obfs has been set for hysteria2
1 parent adbffcb commit e71597a

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

subscribe/clash.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -632,8 +632,13 @@ def verify(item: dict, mihomo: bool = True) -> bool:
632632
authentication = "password"
633633
if "obfs" in item:
634634
obfs = utils.trim(item.get("obfs", ""))
635-
if obfs != "salamander":
636-
return False
635+
if obfs:
636+
if obfs != "salamander":
637+
return False
638+
obfs_password = utils.trim(item.get("obfs-password", ""))
639+
if not obfs_password:
640+
return False
641+
637642
if "obfs-password" in item and type(item["obfs-password"]) != str:
638643
return False
639644
else:

0 commit comments

Comments
 (0)