[PR #5650] [MERGED] Add per-client external link controls #5948

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

📋 Pull Request Information

Original PR: https://github.com/MHSanaei/3x-ui/pull/5650
Author: @fastnas2023
Created: 6/29/2026
Status: ✅ Merged
Merged: 8/18/2026
Merged by: @MHSanaei

Base: main ← Head: pr/external-link-controls


📝 Commits (7)

  • 74ba9a0 Add enable toggle for external client links
  • bd1246c Document external link enable API fields
  • effcc9b Extend external client link metadata
  • 81cbadb Fix external subscription cache status updates
  • aa9f26b fix(sub): stop DB writes on external-link cache hits; complete i18n
  • 9e06536 Merge branch 'main' into pr/external-link-controls (PR #5650)
  • aac7847 fix(sub): address the review on per-client external link controls

📊 Changes

29 files changed (+728 additions, -84 deletions)

View changed files

📝 frontend/public/openapi.json (+21 -4)
📝 frontend/scripts/build-openapi.mjs (+12 -2)
📝 frontend/src/hooks/useClients.ts (+8 -1)
📝 frontend/src/pages/api-docs/endpoints.ts (+4 -4)
📝 frontend/src/pages/clients/ClientFormModal.tsx (+105 -30)
📝 frontend/src/pages/clients/ClientsPage.css (+70 -0)
📝 frontend/src/schemas/client.ts (+6 -0)
📝 internal/database/db.go (+40 -0)
📝 internal/database/model/model.go (+12 -7)
📝 internal/sub/external_config.go (+38 -19)
📝 internal/sub/external_config_test.go (+26 -0)
📝 internal/sub/external_subscription.go (+40 -6)
📝 internal/sub/external_subscription_test.go (+124 -4)
📝 internal/sub/mutation_audit_test.go (+11 -0)
📝 internal/web/service/client_external_link.go (+35 -7)
➕ internal/web/service/client_external_link_test.go (+124 -0)
📝 internal/web/translation/ar-EG.json (+4 -0)
📝 internal/web/translation/en-US.json (+4 -0)
📝 internal/web/translation/es-ES.json (+4 -0)
📝 internal/web/translation/fa-IR.json (+4 -0)

...and 9 more files

📄 Description

Summary

Adds per-client controls for external links and external subscriptions without changing WireGuard client binding architecture.

  • add enable/disable support for each external link/subscription row
  • add optional expiryTime and namePrefix metadata
  • track lastFetchAt and lastFetchError for remote external subscriptions
  • keep disabled/expired rows visible in the client editor while excluding them from subscription output
  • update API docs/OpenAPI and client form UI

Notes

This is intentionally split from the earlier WireGuard client-binding PR. It does not change the main WireGuard clients[] model on current main.

Verification

  • go test ./internal/sub ./internal/web/service
  • npm --prefix frontend run build
  • go test ./...
  • git diff --check

🔄 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/5650 **Author:** [@fastnas2023](https://github.com/fastnas2023) **Created:** 6/29/2026 **Status:** ✅ Merged **Merged:** 8/18/2026 **Merged by:** [@MHSanaei](https://github.com/MHSanaei) **Base:** `main` ← **Head:** `pr/external-link-controls` --- ### 📝 Commits (7) - [`74ba9a0`](https://github.com/MHSanaei/3x-ui/commit/74ba9a0cd8e855bcda433e2332a52d0203a29eb6) Add enable toggle for external client links - [`bd1246c`](https://github.com/MHSanaei/3x-ui/commit/bd1246c00f49869557a8b50fe1b09890a57bc1f8) Document external link enable API fields - [`effcc9b`](https://github.com/MHSanaei/3x-ui/commit/effcc9bb4aa5e0ce4a24067a60c50c5913471889) Extend external client link metadata - [`81cbadb`](https://github.com/MHSanaei/3x-ui/commit/81cbadb17f4fa5a3cab64e4bb904a932c78b636b) Fix external subscription cache status updates - [`aa9f26b`](https://github.com/MHSanaei/3x-ui/commit/aa9f26bc5ff340eb73de82ff09d36f144894899c) fix(sub): stop DB writes on external-link cache hits; complete i18n - [`9e06536`](https://github.com/MHSanaei/3x-ui/commit/9e06536e599019ed83e2883e707e94c197e5c7c1) Merge branch 'main' into pr/external-link-controls (PR #5650) - [`aac7847`](https://github.com/MHSanaei/3x-ui/commit/aac784759189f64ff045daefc334a0d15abff884) fix(sub): address the review on per-client external link controls ### 📊 Changes **29 files changed** (+728 additions, -84 deletions) <details> <summary>View changed files</summary> 📝 `frontend/public/openapi.json` (+21 -4) 📝 `frontend/scripts/build-openapi.mjs` (+12 -2) 📝 `frontend/src/hooks/useClients.ts` (+8 -1) 📝 `frontend/src/pages/api-docs/endpoints.ts` (+4 -4) 📝 `frontend/src/pages/clients/ClientFormModal.tsx` (+105 -30) 📝 `frontend/src/pages/clients/ClientsPage.css` (+70 -0) 📝 `frontend/src/schemas/client.ts` (+6 -0) 📝 `internal/database/db.go` (+40 -0) 📝 `internal/database/model/model.go` (+12 -7) 📝 `internal/sub/external_config.go` (+38 -19) 📝 `internal/sub/external_config_test.go` (+26 -0) 📝 `internal/sub/external_subscription.go` (+40 -6) 📝 `internal/sub/external_subscription_test.go` (+124 -4) 📝 `internal/sub/mutation_audit_test.go` (+11 -0) 📝 `internal/web/service/client_external_link.go` (+35 -7) ➕ `internal/web/service/client_external_link_test.go` (+124 -0) 📝 `internal/web/translation/ar-EG.json` (+4 -0) 📝 `internal/web/translation/en-US.json` (+4 -0) 📝 `internal/web/translation/es-ES.json` (+4 -0) 📝 `internal/web/translation/fa-IR.json` (+4 -0) _...and 9 more files_ </details> ### 📄 Description ## Summary Adds per-client controls for external links and external subscriptions without changing WireGuard client binding architecture. - add enable/disable support for each external link/subscription row - add optional expiryTime and namePrefix metadata - track lastFetchAt and lastFetchError for remote external subscriptions - keep disabled/expired rows visible in the client editor while excluding them from subscription output - update API docs/OpenAPI and client form UI ## Notes This is intentionally split from the earlier WireGuard client-binding PR. It does not change the main WireGuard clients[] model on current main. ## Verification - go test ./internal/sub ./internal/web/service - npm --prefix frontend run build - go test ./... - git diff --check --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-02 04:05:14 +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#5948
No description provided.