Skip to content

Commit

Permalink
improve(sing-box): parse hysteria2 obfs settings correctly (#22)
Browse files Browse the repository at this point in the history
  • Loading branch information
khodedawsh authored Dec 16, 2024
1 parent b0ef5de commit c5a32ec
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions marznode/backends/singbox/_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,14 @@ def _resolve_inbounds(self):

if inbound["type"] == "shadowtls" and "version" in inbound:
settings["shadowtls_version"] = inbound["version"]
elif inbound["type"] == "hysteria2" and "obfs" in inbound:
try:
settings["header_type"], settings["path"] = (
inbound["obfs"]["type"],
inbound["obfs"]["password"],
)
except KeyError:
pass

self.inbounds.append(settings)
self.inbounds_by_tag[inbound["tag"]] = settings
Expand Down

0 comments on commit c5a32ec

Please sign in to comment.