mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 21:18:19 +07:00
[PR #5815] [MERGED] feat(xray): default outbound in basic routing #5995
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#5995
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/5815
Author: @rqzbeh
Created: 7/5/2026
Status: ✅ Merged
Merged: 7/8/2026
Merged by: @MHSanaei
Base:
main← Head:feat/routing-default-outbound📝 Commits (4)
2a48028feat(xray): default outbound picker in basic routing5bc4453fix(xray): keep direct/blocked outbounds when changing default252d6f8Merge branch 'main' into feat/routing-default-outboundd7c5163style(routing): revert incidental whitespace churn📊 Changes
17 files changed (+138 additions, -15 deletions)
View changed files
📝
frontend/src/pages/xray/basics/constants.ts(+1 -0)📝
frontend/src/pages/xray/basics/helpers.ts(+23 -0)📝
frontend/src/pages/xray/routing/RoutingBasic.tsx(+24 -2)➕
frontend/src/test/routing-default-outbound.test.ts(+51 -0)📝
internal/web/translation/ar-EG.json(+3 -1)📝
internal/web/translation/en-US.json(+3 -1)📝
internal/web/translation/es-ES.json(+3 -1)📝
internal/web/translation/fa-IR.json(+3 -1)📝
internal/web/translation/id-ID.json(+3 -1)📝
internal/web/translation/ja-JP.json(+3 -1)📝
internal/web/translation/pt-BR.json(+3 -1)📝
internal/web/translation/ru-RU.json(+3 -1)📝
internal/web/translation/tr-TR.json(+3 -1)📝
internal/web/translation/uk-UA.json(+3 -1)📝
internal/web/translation/vi-VN.json(+3 -1)📝
internal/web/translation/zh-CN.json(+3 -1)📝
internal/web/translation/zh-TW.json(+3 -1)📄 Description
Summary
Adds a Default Outbound field to Xray → Routing → Basic Routing so unmatched traffic uses a chosen outbound (freedom/direct, blackhole/blocked, or any template outbound tag) by placing it first in the outbounds list.
Why
Users often want a deny-by-default setup (only explicit rules pass) or want all unmatched traffic to go through WARP or another proxy without manually reordering outbounds on the Outbounds tab.
Type of change
Areas affected
How was this tested?
npx vitest run src/test/routing-default-outbound.test.ts(get/set default tag, blocked creation, reorder)go test ./internal/xray/... -shortgo build .blockedor a custom tag (e.g.warp), save template, confirm first outbound in JSON matches selection and Route Tester shows default-outbound message when no rule matches.Screenshots / recordings
N/A (simple Select at top of Basic Routing).
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.