mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 21:18:19 +07:00
[PR #6333] [MERGED] Feature/fix external subscription client expiry #6221
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#6221
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/6333
Author: @duqigit
Created: 8/26/2026
Status: ✅ Merged
Merged: 9/3/2026
Merged by: @MHSanaei
Base:
main← Head:feature/fix-external-subscription-client-expiry📝 Commits (4)
b1583f4fix(sub): honor client expiry for external linksf3be5d6fix(ui): show client expiry on external links51138c3fix(sub): address external expiry reviewf47b1f9Merge branch 'main' into feature/fix-external-subscription-client-expiry📊 Changes
16 files changed (+332 additions, -61 deletions)
View changed files
📝
docs/content/docs/en/reference/api/clients.mdx(+10 -4)📝
docs/public/openapi.json(+2 -2)📝
frontend/public/openapi.json(+2 -2)📝
frontend/src/components/form/DateTimePicker.tsx(+21 -6)➕
frontend/src/lib/clients/external-link.ts(+10 -0)📝
frontend/src/pages/api-docs/endpoints.ts(+2 -2)📝
frontend/src/pages/clients/ClientFormModal.tsx(+33 -22)➕
frontend/src/test/client-external-link-expiry.test.ts(+17 -0)📝
frontend/src/test/date-time-picker.test.tsx(+53 -2)📝
internal/sub/clash_service.go(+13 -4)📝
internal/sub/controller.go(+4 -4)📝
internal/sub/external_config.go(+6 -5)➕
internal/sub/inactive_external_sub_test.go(+115 -0)📝
internal/sub/json_service.go(+11 -2)📝
internal/sub/mutation_audit_test.go(+26 -6)📝
internal/sub/service.go(+7 -0)📄 Description
Summary
Ensure external links and remote subscriptions respect the owning client's enabled and expiry state.
On the client page, external-link expiry fields now display the main client's expiry time when no link-specific expiry is configured.
Why
Previously, external links could remain available after the owning client was disabled or expired. The frontend also left the external-link expiry field empty, making the effective expiration unclear.
This change keeps external subscription behavior consistent with the main client.
Type of change
Areas affected
How was this tested?
Backend:
go test ./internal/sub.Frontend:
Screenshots / recordings
Not included. The change only populates the existing expiry field and does not add new controls or alter the page layout.
Breaking changes
None.
expiryTime: 0continues to mean no link-specific expiry. The owning client's enabled state and expiry still apply.Checklist
go build ./...and the full test suite pass locally.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.