mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 21:18:19 +07:00
[GH-ISSUE #6671] [Feature]: Option to disable default PROXY group when using custom Clash URL #4456
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#4456
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?
Originally created by @HinaMai on GitHub (Sep 27, 2026).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/6671
Is your feature request related to a problem?
When importing custom Clash / Mihomo routing rules via a fixed HTTPS URL, 3x-ui still forcefully appends the default
PROXYgroup into the subscription YAML. Users providing complete profiles via URL cannot remove it.Describe the solution you'd like
Add a toggle switch under Settings -> Subscription -> Clash / Mihomo (e.g. "Include Default PROXY Group", default:
true).When turned off, do not inject the default
PROXYgroup, allowing the remote HTTPS URL profile to fully control the proxy groups.Alternatives you've considered
No response
Concrete use case
No response
Mockups, screenshots, or examples
No response
Which parts of the panel would this affect?
Frontend (UI / panel pages), Backend (API endpoints, login, settings)
Are you willing to help?
Before submitting
@github-actions[bot] commented on GitHub (Sep 27, 2026):
This is a valid feature request: the default
PROXYgroup is kept on purpose today, and no setting turns it off. There is a workaround, though. If your remote profile defines its own group named exactlyPROXY, that group replaces the built-in one instead of being added next to it.What the code does now
The Clash/Mihomo builder always starts from a base config with one
PROXYselect group and aMATCH,PROXYrule (internal/sub/clash_service.go:156-164):A remote HTTPS source is then merged in by
mergeRemoteClashRules, which only takesproxy-groups,rule-providersandrulesfrom it (remoteClashAllowedKey,clash_service.go:1377-1384). The groups are merged by name inmergeClashProxyGroups(clash_service.go:1487-1520). Remote groups go first, and each base group is appended afterwards unless the remote already used its name:This is deliberate.
TestMergeRemoteClashRulesKeepsBaseProxyGroupWhenRemoteOmitsIt(internal/sub/remote_routing_test.go:509) asserts thatPROXYsurvives when the remote leaves it out.TestMergeRemoteClashRulesPreservesGeneratedProxies(remote_routing_test.go:441) shows a remotePROXYgroup taking the place of the default one.Workaround available today
Name one of your remote groups
PROXY. The panel will then drop its generated group, and the output will contain only your groups:include-all: trueis accepted here. The pinned test above uses it, andvalidateRemoteClashValueonly rejects a non-emptyuse:list (proxy-providers). If your rules include their ownMATCHrule, the defaultMATCH,PROXYis dropped too (mergeClashRules,clash_service.go:1537-1539).A toggle to leave out the default group completely, even when the remote does not name one
PROXY, would be new behaviour. So this stays open as a feature request. If the toggle is added, a remote profile would then have to reference only its own groups, becausevalidateClashRouteGraph(clash_service.go:1386) rejects any reference to an unknown group.Related: #5889 (custom Clash/Mihomo profiles with proxy-groups, rule-providers and rules), #6363 (proxy-providers in the remote Clash routing source).
Verdict: Feature request
This reply was generated automatically; a maintainer may follow up.