mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 21:18:19 +07:00
[PR #6361] [MERGED] feat(routing): add panel-only comment field to routing rules #6234
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#6234
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/6361
Author: @Ssentiago
Created: 8/29/2026
Status: ✅ Merged
Merged: 9/2/2026
Merged by: @MHSanaei
Base:
main← Head:feat/routing-rule-comments📝 Commits (1)
a864e07feat(routing): add panel-only comment field to routing rules📊 Changes
9 files changed (+71 additions, -4 deletions)
View changed files
📝
frontend/src/pages/xray/routing/RoutingTab.css(+30 -0)📝
frontend/src/pages/xray/routing/RoutingTab.tsx(+1 -0)📝
frontend/src/pages/xray/routing/RuleCardList.tsx(+7 -0)📝
frontend/src/pages/xray/routing/RuleFormModal.tsx(+8 -0)📝
frontend/src/pages/xray/routing/types.ts(+1 -0)📝
frontend/src/pages/xray/routing/useRoutingColumns.tsx(+15 -1)📝
frontend/src/schemas/routing.ts(+1 -0)📝
frontend/src/schemas/xray.ts(+1 -0)📝
internal/web/service/xray.go(+7 -3)📄 Description
Summary
commentfield to routing rules for human-readable annotations.commentfrom the generated xray-core config (same pattern as the existingenabledflag).Why
When adding routing rules manually — specific IPs, domains — it's easy to forget what each rule is for after a few weeks. A rule pointing at
91.108.4.0/22or10.0.0.0/8means nothing a month later without context. A panel-only comment field lets admins label rules (e.g. "1С server subnet", "Office VPN range", "Temp bypass for client X") so they remain readable over time, without affecting the xray-core config.Type of change
Areas affected
How was this tested?
npm run typecheckpasses.go build ./internal/web/service/passes.Breaking changes
None. The
commentfield is optional and silently ignored by xray-core if it ever leaks through (unknown keys are tolerated by xray's JSON parser).Checklist
I tested the change locally and confirmed the described behavior.
I added or updated tests for the new behavior.
go build ./...and the test suite pass locally.My commits follow the project's existing message style.
I have no unrelated changes mixed into this PR.
I tested the change locally and confirmed the described behavior.
I added or updated tests for the new behavior.
go build ./...and the test suite pass locally.My commits follow the project's existing message style.
I have no unrelated changes mixed into this PR.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.