mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 21:18:19 +07:00
[PR #6576] [MERGED] fix(sub): preserve external VLESS encryption in Clash subscriptions #6356
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#6356
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/6576
Author: @SakikoTogawa0214
Created: 9/16/2026
Status: ✅ Merged
Merged: 9/26/2026
Merged by: @MHSanaei
Base:
main← Head:codex/pr-6572-verified📝 Commits (2)
f3cce35fix(sub): preserve external VLESS encryption in Clash subscriptionsb8739c0test(nodes): wait for chart effects in history panel assertions📊 Changes
3 files changed (+146 additions, -13 deletions)
View changed files
📝
frontend/src/test/node-history-panel.test.tsx(+16 -13)📝
internal/sub/clash_external.go(+6 -0)➕
internal/sub/clash_external_vless_test.go(+124 -0)📄 Description
Summary
Preserve VLESS
encryptionwhen external share links and fetched subscriptions are merged into Clash/Mihomo YAML. Trim whitespace and omit empty ornonevalues, matching the existing local inbound export.Why
The external-link parser already retains
encryption, but the Clash converter drops it. Encrypted external VLESS nodes therefore lose a required connection parameter in the generated subscription.Closes #6572.
Type of change
Areas affected
How was this tested?
Added 10 regression cases covering encrypted/plain values, whitespace, UUID/flow preservation, and merged direct-link, HTTPS plaintext, and HTTPS Base64 sources. They fail with the original converter and pass with this fix, including the race detector:
Separately verified real Mihomo 1.19.31 and Xray 26.9.9 connections locally for all three external sources: retaining
encryptionconnects; removing it reproduces the connection failure.Full CI on this exact commit: all 8 jobs passed, including Go tests, race + shuffle, PostgreSQL, fuzzing, lint, code generation, vulnerability checks, and frontend validation (166 files / 1,608 tests).
Build matrix on this exact commit: all 8 Linux/Windows platform builds passed.
Breaking changes
None.
Checklist
go build ./...and the full test suite pass on Ubuntu CI (linked above); focused regression and real-core checks also pass locally.npm run lint,npm run typecheck, andnpm run buildpass in CI; no frontend files changed.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.