mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-11-29 22:14:50 +03:00
feat(sub): report why a subscription balancer emits nothing (#7209)
A subscription balancer whose inbounds were deleted, disabled, changed to a protocol with no JSON outbound, left without clients or closed by their hosts simply vanished from the JSON subscription, and nothing in the panel or the log said why. GET /panel/api/sub-balancers now returns a problems[] array per balancer with stable codes: unknown_inbound, disabled_inbound, json_incapable_protocol, inbound_without_clients, hosts_excluded_from_json and no_members. Settings -> Sub Balancers shows a warning tag whose tooltip names each cause and the affected inbounds, and the log records a balancer's problems when they change instead of on every listing. The advisories are read from the stored rows and never change what a subscription emits: a balancer with no usable member is still omitted. The list of JSON-incapable protocols is pinned to the renderer, the subscription allowlist and the form by tests.
This commit is contained in:
@@ -1444,6 +1444,38 @@ export const EXAMPLES: Record<string, unknown> = {
|
||||
"strategy": "random",
|
||||
"updatedAt": 1710000000000
|
||||
},
|
||||
"SubBalancerProblem": {
|
||||
"code": "unknown_inbound",
|
||||
"detail": "amneziawg",
|
||||
"inboundIds": [
|
||||
7,
|
||||
9
|
||||
]
|
||||
},
|
||||
"SubBalancerWithProblems": {
|
||||
"createdAt": 1710000000000,
|
||||
"enabled": true,
|
||||
"id": 1,
|
||||
"inboundIds": [
|
||||
1,
|
||||
3
|
||||
],
|
||||
"memberWeights": {},
|
||||
"problems": [
|
||||
{
|
||||
"code": "unknown_inbound",
|
||||
"detail": "amneziawg",
|
||||
"inboundIds": [
|
||||
7,
|
||||
9
|
||||
]
|
||||
}
|
||||
],
|
||||
"remark": "auto-fastest",
|
||||
"sortOrder": 1,
|
||||
"strategy": "random",
|
||||
"updatedAt": 1710000000000
|
||||
},
|
||||
"TgBotCapabilities": {
|
||||
"groupPrivacy": false,
|
||||
"inlineEnabled": true,
|
||||
|
||||
Reference in New Issue
Block a user