mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 21:18:19 +07:00
[PR #6412] [MERGED] feat(sub): add dummy info node and status configs for subscriptions #6258
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#6258
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/6412
Author: @rqzbeh
Created: 9/4/2026
Status: ✅ Merged
Merged: 9/8/2026
Merged by: @MHSanaei
Base:
main← Head:feat/subscription-info-node📝 Commits (6)
a7304d6feat(settings): add subInfoNodeEnable and status template settingsfe0f9eafeat(sub): add dummy info node and status configs for raw links7041753feat(sub): support dummy info node in clash and json subscriptionse4a1b5ffeat(ui): add subscription info node switch and status templates to settings6b2efe1style: apply gofumpt formatting0cc1440fix(sub): address review feedback on subscription info node📊 Changes
33 files changed (+1375 additions, -36 deletions)
View changed files
📝
docs/public/openapi.json(+24 -0)📝
frontend/public/openapi.json(+24 -0)📝
frontend/src/generated/examples.ts(+6 -0)📝
frontend/src/generated/schemas.ts(+24 -0)📝
frontend/src/generated/types.ts(+6 -0)📝
frontend/src/generated/zod.ts(+6 -0)📝
frontend/src/models/setting.ts(+4 -0)📝
frontend/src/pages/settings/SubscriptionGeneralTab.tsx(+35 -0)📝
frontend/src/schemas/setting.ts(+3 -0)➕
frontend/src/test/setting-sub-info-node.test.ts(+27 -0)➕
internal/sub/clash_info_node_test.go(+248 -0)📝
internal/sub/clash_service.go(+41 -0)➕
internal/sub/json_info_node_test.go(+247 -0)📝
internal/sub/json_service.go(+45 -0)📝
internal/sub/remark_vars.go(+1 -1)📝
internal/sub/service.go(+102 -10)➕
internal/sub/service_info_node_test.go(+365 -0)📝
internal/web/entity/entity.go(+9 -6)📝
internal/web/service/setting.go(+22 -5)➕
internal/web/service/setting_sub_info_node_test.go(+44 -0)...and 13 more files
📄 Description
Summary
Adds an opt-in setting (
subInfoNodeEnable) to serve subscription remarks, remaining traffic, and days left as a dedicated dummy SOCKS info node (127.0.0.1:1080) at the top of subscriptions, and return a status-only info node when a subscriber account is expired or traffic-depleted.Why
Many users and client apps prefer having a dedicated, visually clean status node at the top of their subscription list rather than embedding dynamic usage counters inside the name of connection links. Furthermore, when an account expires or its data quota is exhausted, returning a clear status node informs the subscriber directly inside their client app why their connection is inactive.
Type of change
Areas affected
How was this tested?
go test ./internal/...) and frontend Vitest tests (npm test).npm run buildandnpm run typecheck.Screenshots / recordings
Breaking changes
None. This feature is opt-in (
subInfoNodeEnable: falseby default).Checklist
go build ./...and the test suite pass locally.npm run lint,npm run typecheck, andnpm run buildpass.🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.