mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 19:11:53 +07:00
[PR #5278] [MERGED] feat(finalmask): support Salamander packetSize (Gecko) and Realm tlsConfig for Hysteria2 #5841
Labels
No labels
backlog
bug
clarification needed
documentation
duplicate
enhancement
github_actions
good first issue
invalid
javascript
New Feature
PR welcomed
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
MHSanaei/3x-ui#5841
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/MHSanaei/3x-ui/pull/5278
Author: @rqzbeh
Created: 6/13/2026
Status: ✅ Merged
Merged: 6/14/2026
Merged by: @MHSanaei
Base:
main← Head:feat/hysteria2-gecko-realm-tls📝 Commits (4)
ecd6e17feat(finalmask): support salamander packetSize (Gecko) and realm tlsConfig9d9e3d4test(finalmask): add snapshots for salamander-gecko and realm-tls fixtures436ccf2Merge branch 'main' into feat/hysteria2-gecko-realm-tls5b904d7feat(finalmask): polished Gecko UX with core-grounded validation📊 Changes
6 files changed (+300 additions, -17 deletions)
View changed files
📝
frontend/src/lib/xray/forms/transport/FinalMaskForm.tsx(+178 -17)📝
frontend/src/test/__snapshots__/finalmask.test.ts.snap(+40 -0)📝
frontend/src/test/finalmask.test.ts(+20 -0)➕
frontend/src/test/golden/fixtures/finalmask/realm-tls.json(+17 -0)➕
frontend/src/test/golden/fixtures/finalmask/salamander-gecko.json(+5 -0)📝
frontend/src/test/outbound-link-parser.test.ts(+40 -0)📄 Description
Summary
Expose two Hysteria2 finalmask features that the current Xray-core already supports but the panel UI did not surface: Salamander
packetSize(Gecko) and the Realm mask's optionaltlsConfig.Why
Hysteria v2.9.1 and v2.9.2 added these to Xray-core, all of which land in the version this panel already pins (Xray 26.6.1,
94ffd50):packetSizerange; when present, core builds aGeckoConfig{MinPacketSize, MaxPacketSize}, otherwise plain Salamander. Ref: XTLS/Xray-core#6198 (66a8100).tlsConfig(xray's flatTLSConfig) for the connection to the realm server. Ref: XTLS/Xray-core#6137 (3630369).The panel already whitelisted the
salamanderandrealmmask types and passedsettingsthrough opaquely, but the form exposed only Salamanderpasswordand Realmurl/stunServers— so users could not configure the new fields without hand-editing JSON. This adds typed schema + form support for both.Type of change
Areas affected
How was this tested?
Frontend gates:
tsc --noEmitandeslint srcpass; added Vitest round-trip cases for both new shapes under thefm=share-link param, plus golden fixtures parsed throughFinalMaskStreamSettingsSchema.Validated against the bundled Xray 26.6.1 (
94ffd50) — fed the exact JSON the panel emits toxray run -test:packetSize: "100-200"(Gecko)Configuration OK.tlsConfig(serverName/alpn/fingerprint/allowInsecure)Configuration OK.packetSize)Configuration OK.(backward compatible)packetSize: "not-a-range"Built via the repo
Dockerfile(node:22-alpine frontend stage + Go builder) to confirm the fullnpm run buildandgo buildsucceed with the change.UI changes:
100-200; empty = plain Salamander, enabling Gecko when set).Screenshots / recordings
To follow.
Breaking changes
None. All new fields are optional and additive. Absent
packetSizepreserves plain-Salamander behaviour; absent realmtlsConfigis unchanged.UdpMaskSchema.settingsstays permissive, matching the existing finalmask design note.Checklist
go buildand the relevant test suite pass locally (no Go changes — settings pass through opaquely).🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.