Is your feature request related to a problem?
Yes.
3x-ui can already generate Clash/Mihomo YAML subscriptions with multiple proxies and a default PROXY group, and recent releases added routing rules / enable-routing support for Clash subscriptions.
However, the generated proxy-groups section is currently not configurable enough for client-side failover scenarios.
For example, a generated subscription may look like this:
proxies:
- name: AMS-01
type: vless
server: ams-01.example.com
port: 443
- name: RU-01
type: vless
server: ru-01.example.com
port: 443
proxy-groups:
- name: PROXY
type: select
proxies:
- AMS-01
- RU-01
- DIRECT
rules:
- MATCH,PROXY
This works for manual selection, but it does not provide real priority-based failover.
The desired behavior is:
Client -> AMS-01 directly during normal operation
Client -> RU-01 only if AMS-01 is unavailable or fails health checks
This is not the same as the existing Xray outbound balancer workflow. Xray balancer works on the entry node after the client has already connected to that node, which means the entry node becomes part of the data path. In this use case, the backup/control node must not relay all traffic during normal operation.
Describe the solution you'd like
Please add configurable Clash/Mihomo proxy group templates for generated YAML subscriptions.
The panel could allow admins to configure the generated proxy-groups section, at least for these group types:
select
fallback
url-test
- optionally
load-balance
Suggested UI placement:
Settings -> Subscription -> Clash / Mihomo
or a dedicated section near the existing Clash/Mihomo routing settings.
Suggested options:
-
Group name
Example: PROXY, AUTO, FALLBACK
-
Group type
Example: select, fallback, url-test, load-balance
-
Ordered proxy list
The admin should be able to choose which generated nodes/inbounds are included and in what order.
-
Optional DIRECT entry
Checkbox: include DIRECT in the group or not.
-
Health-check options for fallback / url-test
Example fields:
url: http://www.gstatic.com/generate_204
interval: 30
timeout: 5000
lazy: false
- Default routing target
The generated final rule should be able to use this group:
instead of always targeting a hardcoded PROXY group.
Expected generated YAML example:
proxies:
- name: AMS-01
type: vless
server: ams-01.example.com
port: 443
- name: RU-01
type: vless
server: ru-01.example.com
port: 443
proxy-groups:
- name: AUTO
type: fallback
proxies:
- AMS-01
- RU-01
url: http://www.gstatic.com/generate_204
interval: 30
timeout: 5000
lazy: false
rules:
- MATCH,AUTO
Expected behavior:
- Clash/Mihomo uses
AMS-01 first.
- If
AMS-01 fails health checks or becomes unreachable, Clash/Mihomo switches to RU-01.
- When
AMS-01 becomes healthy again, Clash/Mihomo switches back to it.
- The backup node is not used during normal operation, so it does not relay traffic unless failover is actually needed.
Alternatives you've considered
-
Current generated type: select group
This requires manual switching and does not provide automatic failover.
-
Xray outbound balancer
This is not suitable for this use case because users connect to the entry node first, and then the entry node forwards traffic to backend nodes. That makes the entry node part of the normal data path, which is exactly what I want to avoid.
-
Inbound fallbacks
Xray inbound fallbacks are useful for protocol/SNI/path fallback after a connection reaches the server, but they do not solve client-side endpoint failover when the primary server is unreachable.
-
External subscription converters
This works, but moves subscription logic outside 3x-ui, makes deployments more complex, and breaks the idea of 3x-ui being the single source of truth for clients, nodes, subscription links, and generated configs.
-
Manually editing YAML after subscription import
This works only temporarily. The changes are lost or need to be repeated after subscription updates.
Concrete use case
I manage a main 3x-ui panel on RU-01.
RU-01 acts as:
- the main 3x-ui control panel
- the subscription endpoint
- the backup ingress node
There is also a remote node:
AMS-01 - primary data-plane node
Clients fetch their Clash/Mihomo subscriptions from RU-01, but during normal operation they should connect directly to AMS-01.
Normal data path:
If AMS-01 is down, unreachable, or blocked from the client network, the client should automatically fail over to RU-01.
Failover data path:
Client -> RU-01 -> tunnel/routing rule -> AMS-01
So RU-01 should only be used as a backup ingress path when the direct connection to AMS-01 fails health checks.
The undesired normal behavior is:
Client -> RU-01 -> AMS-01
because that makes RU-01 part of the normal data path and consumes traffic on the control/backup node all the time.
This is why the current Xray balancer model is not suitable for this use case. Xray outbound balancing works after the client has already connected to the entry node. In my scenario, the client should normally bypass the entry/control node entirely and connect to AMS-01 directly.
This request is specifically about client-side Clash/Mihomo failover in generated subscriptions:
Primary:
Client -> AMS-01
Fallback:
Client -> RU-01 -> AMS-01
Mockups, screenshots, or examples
Current generated behavior:
proxy-groups:
- name: PROXY
proxies:
- AMS-01
- RU-01
- DIRECT
type: select
rules:
- MATCH,PROXY
Requested generated behavior:
proxy-groups:
- name: AUTO
type: fallback
proxies:
- AMS-01
- RU-01
url: http://www.gstatic.com/generate_204
interval: 30
timeout: 5000
lazy: false
rules:
- MATCH,AUTO
Possible UI idea:
Panel Settings -> Subscription -> Clash / Mihomo
[ ] Enable configurable proxy groups
Group name: AUTO
Group type: fallback
Health-check URL: http://www.gstatic.com/generate_204
Interval: 30
Timeout: 5000
Lazy: false
Proxies:
[1] AMS-01
[2] RU-01
[ ] Include DIRECT
Default MATCH target: AUTO
Which parts of the panel would this affect?
Frontend (UI / panel pages), Subscription (share links / Clash / JSON), Backend (API endpoints, login, settings), Xray config generation
Are you willing to help?
Before submitting
Is your feature request related to a problem?
Yes.
3x-ui can already generate Clash/Mihomo YAML subscriptions with multiple proxies and a default
PROXYgroup, and recent releases added routing rules / enable-routing support for Clash subscriptions.However, the generated
proxy-groupssection is currently not configurable enough for client-side failover scenarios.For example, a generated subscription may look like this:
This works for manual selection, but it does not provide real priority-based failover.
The desired behavior is:
This is not the same as the existing Xray outbound balancer workflow. Xray balancer works on the entry node after the client has already connected to that node, which means the entry node becomes part of the data path. In this use case, the backup/control node must not relay all traffic during normal operation.
Describe the solution you'd like
Please add configurable Clash/Mihomo proxy group templates for generated YAML subscriptions.
The panel could allow admins to configure the generated
proxy-groupssection, at least for these group types:selectfallbackurl-testload-balanceSuggested UI placement:
or a dedicated section near the existing Clash/Mihomo routing settings.
Suggested options:
Group name
Example:
PROXY,AUTO,FALLBACKGroup type
Example:
select,fallback,url-test,load-balanceOrdered proxy list
The admin should be able to choose which generated nodes/inbounds are included and in what order.
Optional
DIRECTentryCheckbox: include
DIRECTin the group or not.Health-check options for
fallback/url-testExample fields:
The generated final rule should be able to use this group:
instead of always targeting a hardcoded
PROXYgroup.Expected generated YAML example:
Expected behavior:
AMS-01first.AMS-01fails health checks or becomes unreachable, Clash/Mihomo switches toRU-01.AMS-01becomes healthy again, Clash/Mihomo switches back to it.Alternatives you've considered
Current generated
type: selectgroupThis requires manual switching and does not provide automatic failover.
Xray outbound balancer
This is not suitable for this use case because users connect to the entry node first, and then the entry node forwards traffic to backend nodes. That makes the entry node part of the normal data path, which is exactly what I want to avoid.
Inbound fallbacks
Xray inbound fallbacks are useful for protocol/SNI/path fallback after a connection reaches the server, but they do not solve client-side endpoint failover when the primary server is unreachable.
External subscription converters
This works, but moves subscription logic outside 3x-ui, makes deployments more complex, and breaks the idea of 3x-ui being the single source of truth for clients, nodes, subscription links, and generated configs.
Manually editing YAML after subscription import
This works only temporarily. The changes are lost or need to be repeated after subscription updates.
Concrete use case
I manage a main 3x-ui panel on
RU-01.RU-01acts as:There is also a remote node:
Clients fetch their Clash/Mihomo subscriptions from
RU-01, but during normal operation they should connect directly toAMS-01.Normal data path:
If
AMS-01is down, unreachable, or blocked from the client network, the client should automatically fail over toRU-01.Failover data path:
So
RU-01should only be used as a backup ingress path when the direct connection toAMS-01fails health checks.The undesired normal behavior is:
because that makes
RU-01part of the normal data path and consumes traffic on the control/backup node all the time.This is why the current Xray balancer model is not suitable for this use case. Xray outbound balancing works after the client has already connected to the entry node. In my scenario, the client should normally bypass the entry/control node entirely and connect to
AMS-01directly.This request is specifically about client-side Clash/Mihomo failover in generated subscriptions:
Mockups, screenshots, or examples
Current generated behavior:
Requested generated behavior:
Possible UI idea:
Which parts of the panel would this affect?
Frontend (UI / panel pages), Subscription (share links / Clash / JSON), Backend (API endpoints, login, settings), Xray config generation
Are you willing to help?
Before submitting