mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 21:18:19 +07:00
[PR #6944] [MERGED] fix(sub): preserve external Hysteria2 Clash options #6532
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#6532
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/6944
Author: @HamedSanaei
Created: 10/26/2026
Status: ✅ Merged
Merged: 11/2/2026
Merged by: @MHSanaei
Base:
main← Head:codex/fix-hysteria2-external-clash📝 Commits (1)
c272e5cfix(sub): preserve external Hysteria2 Clash options📊 Changes
3 files changed (+237 additions, -72 deletions)
View changed files
📝
internal/sub/clash_external.go(+3 -11)➕
internal/sub/clash_external_hysteria_test.go(+186 -0)📝
internal/sub/clash_service.go(+48 -61)📄 Description
Summary
Preserve Hysteria2 obfuscation, packet-size ranges, UDP port hopping, and certificate fingerprints when external
hy2://orhysteria2://links are converted to Mihomo/Clash subscriptions. Share the TLS and finalmask mapping with the inbound Hysteria2 converter.Why
The link parser retains these options in the outbound stream settings, but the external Clash converter previously omitted finalmask settings and the TLS certificate pin. That can produce unusable subscription nodes for servers requiring these options. Closes #6941.
Type of change
Areas affected
How was this tested?
make verifypassed on a Linux filesystem mirror with byte-identical changed files (including 215 frontend test files, Go checks, builds, and Storybook).make racepassed.go test -run '^$' -fuzz 'FuzzParseLink$' -fuzztime=30s ./internal/util/linkpassed.go test -run '^$' -fuzz 'FuzzDecodeCertPin$' -fuzztime=30s ./internal/web/runtimepassed.Screenshots / recordings
N/A (subscription output only).
Breaking changes
None.
Checklist
go build ./...and the test suite pass locally.npm run lint,npm run typecheck, andnpm run buildpass. (N/A: no frontend changes; these checks passed inmake verify.)🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.
[PR #6944] fix(sub): preserve external Hysteria2 Clash optionsto [PR #6944] [MERGED] fix(sub): preserve external Hysteria2 Clash options