[PR #6049] [MERGED] fix(sub): preserve external link names in Clash/JSON #6062

Closed
opened 2026-11-02 04:06:07 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/MHSanaei/3x-ui/pull/6049
Author: @H-TTTTT
Created: 7/20/2026
Status: ✅ Merged
Merged: 7/21/2026
Merged by: @MHSanaei

Base: main ← Head: fix/external-link-names


📝 Commits (1)

  • 26bdb40 fix(sub): preserve external link names in Clash/JSON

📊 Changes

3 files changed (+85 additions, -6 deletions)

View changed files

📝 frontend/src/pages/clients/ClientFormModal.tsx (+11 -2)
📝 internal/sub/external_config.go (+45 -4)
📝 internal/sub/external_config_test.go (+29 -0)

📄 Description

Summary

  • expandEntry now keeps proxy names from external subscription entries (#fragment / vmess ps) instead of clearing them to \"\".
  • Single external links use the row remark when set, otherwise the link's original name — Clash/JSON no longer fall back to the client email.
  • Client form: pass and edit remark for external link rows (was hardcoded to '').

Root cause

  1. Frontend hardcoded remark: '' on submit.
  2. expandEntry set Name: \"\" for subscription kind.
  3. Clash/JSON used ext.Email when Name was empty.

Test plan

  • go test ./internal/sub/ -run 'TestExpandEntry|TestLinkDisplayName|TestApplyRemark'
  • External subscription in Clash keeps original node names
  • Single external link with remark shows that name; without remark keeps #fragment / ps
  • Raw text sub still works (unchanged path via applyRemarkToLink)

Fixes #6032


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/MHSanaei/3x-ui/pull/6049 **Author:** [@H-TTTTT](https://github.com/H-TTTTT) **Created:** 7/20/2026 **Status:** ✅ Merged **Merged:** 7/21/2026 **Merged by:** [@MHSanaei](https://github.com/MHSanaei) **Base:** `main` ← **Head:** `fix/external-link-names` --- ### 📝 Commits (1) - [`26bdb40`](https://github.com/MHSanaei/3x-ui/commit/26bdb40d1dbcadf59de227f6a1152c12ad087ff9) fix(sub): preserve external link names in Clash/JSON ### 📊 Changes **3 files changed** (+85 additions, -6 deletions) <details> <summary>View changed files</summary> 📝 `frontend/src/pages/clients/ClientFormModal.tsx` (+11 -2) 📝 `internal/sub/external_config.go` (+45 -4) 📝 `internal/sub/external_config_test.go` (+29 -0) </details> ### 📄 Description ## Summary - `expandEntry` now keeps proxy names from external subscription entries (`#fragment` / vmess `ps`) instead of clearing them to `\"\"`. - Single external links use the row `remark` when set, otherwise the link's original name — Clash/JSON no longer fall back to the client email. - Client form: pass and edit `remark` for external link rows (was hardcoded to `''`). ## Root cause 1. Frontend hardcoded `remark: ''` on submit. 2. `expandEntry` set `Name: \"\"` for subscription kind. 3. Clash/JSON used `ext.Email` when `Name` was empty. ## Test plan - [x] `go test ./internal/sub/ -run 'TestExpandEntry|TestLinkDisplayName|TestApplyRemark'` - [ ] External subscription in Clash keeps original node names - [ ] Single external link with remark shows that name; without remark keeps `#fragment` / `ps` - [ ] Raw text sub still works (unchanged path via `applyRemarkToLink`) Fixes #6032 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-02 04:06:07 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
MHSanaei/3x-ui#6062
No description provided.