mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 19:11:53 +07:00
[PR #6345] [MERGED] fix(outbounds): preserve stable subscription tags #6227
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#6227
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/6345
Author: @dawNotPoi
Created: 8/28/2026
Status: ✅ Merged
Merged: 9/2/2026
Merged by: @MHSanaei
Base:
main← Head:fix/6341-stable-subscription-tags📝 Commits (1)
c309cd3fix(outbounds): preserve stable subscription tags📊 Changes
2 files changed (+54 additions, -3 deletions)
View changed files
📝
internal/web/service/outbound_subscription.go(+11 -2)📝
internal/web/service/outbound_subscription_test.go(+43 -1)📄 Description
Summary
Why
A newly inserted subscription link could reuse the positional tag of an existing server before that server was processed. The existing server was then assigned a suffixed tag, and the swapped identity-to-tag mapping was persisted across refreshes.
This could silently make an exact routing or balancer tag point to a different physical server.
Closes #6341
Existing subscriptions whose mapping was already corrupted cannot be repaired unambiguously and may still need to be removed and added again once.
Type of change
Areas affected
How was this tested?
Regression coverage confirms:
Commands run:
go test -count=100 -run '^TestAssignStableTags$' ./internal/web/servicego test -race -shuffle=on -count=1 ./internal/web/servicego test ./internal/web/service -count=1make lintmake verifygit diff --checkThe inserted-link regression test was also confirmed to fail against the parent commit and pass with this change.
Screenshots / recordings
N/A — backend-only behavior change.
Breaking changes
None.
Checklist
go build ./...and the test suite pass locally.npm run lint,npm run typecheck, andnpm run buildpass.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.