mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 21:18:19 +07:00
[PR #4904] [MERGED] feat(Clash): Add routing rules and enable routing option for Clash subscriptions #5745
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#5745
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/4904
Author: @Misfit-s
Created: 6/4/2026
Status: ✅ Merged
Merged: 6/4/2026
Merged by: @MHSanaei
Base:
main← Head:main📝 Commits (3)
8f48f5dfeat(clash): add routing rules and enable routing option for Clash/Mihomo subscriptions30ba1f4Merge branch 'main' into main354d142fix📊 Changes
24 files changed (+212 additions, -15 deletions)
View changed files
📝
frontend/src/generated/types.ts(+4 -0)📝
frontend/src/generated/zod.ts(+4 -0)📝
frontend/src/models/setting.ts(+2 -0)📝
frontend/src/pages/api-docs/endpoints.ts(+1 -1)📝
frontend/src/pages/settings/SubscriptionGeneralTab.tsx(+14 -0)📝
frontend/src/schemas/setting.ts(+2 -0)📝
sub/sub.go(+11 -1)📝
sub/subClashService.go(+107 -12)📝
sub/subController.go(+3 -1)📝
web/entity/entity.go(+2 -0)📝
web/service/setting.go(+10 -0)📝
web/translation/ar-EG.json(+4 -0)📝
web/translation/en-US.json(+4 -0)📝
web/translation/es-ES.json(+4 -0)📝
web/translation/fa-IR.json(+4 -0)📝
web/translation/id-ID.json(+4 -0)📝
web/translation/ja-JP.json(+4 -0)📝
web/translation/pt-BR.json(+4 -0)📝
web/translation/ru-RU.json(+4 -0)📝
web/translation/tr-TR.json(+4 -0)...and 4 more files
📄 Description
Summary
Adds a new configuration block to enable, disable, and customize Clash/Mihomo routing rules, positioned directly below the existing Happ routing settings field in the panel.
Why
Managing client-side routing manually across a large number of clients is not scalable. By adding automated Clash/Mihomo configuration exports, administrators can easily push routing rules to all clients at once. This shifts the routing decisions to the client side, preventing unnecessary traffic, reducing server CPU/bandwidth load, and protecting the server IP from being exposed during handshakes for traffic that should be
DIRECT.Related: #4404
Type of change
Areas affected
How was this tested?
Panel Configuration:
DOMAIN,ipinfo.io,DIRECT.Client-Side Verification:
Reactivity & Toggle Test:
Screenshots / recordings
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.