feat: converter map hysteria2 port hopping and realm URI - #2947
Merged
Conversation
Medium1992
force-pushed
the
hy2-uri-obfs-gecko
branch
from
July 7, 2026 21:26
d79025b to
b33d2fb
Compare
Collaborator
|
Thank you for your submission. The rest of the commit looks good, but please remove the FM handling; we do not intend to support this non-standard extension. |
Author
fm has been deleted |
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Extends the hysteria2 mapping in ConvertsV2Ray for more stable parsing of subscriptions and retrieval of the full configuration:
fm= (Xray finalmask JSON) — dashboards (remnawave/3x-ui) include it in the URI as an xhttp extra. Breakdown: salamander→obfs, salamander+packetSize→gecko obfs (+obfs-min/max-packet-size), quicParams→up/down/ports/hop-interval/bbr-profile. Flat URI parameters remain the priority.
Port hopping—the official format is host:443,5000-6000 in the address (url.Parse used to reject this → previously, the entire subscription would fail) → ports.
hysteria2+realm://—a new official scheme from the hysteria docs → realm-opts; the realm mask in fm is also supported.
Purely additive: without fm/realm/multi-port, behavior remains the same.