fix(clients): derive edit-form flow from per-inbound override

SyncInbound runs once per inbound and unconditionally overwrites the canonical clients.Flow column. A non-flow inbound (Hysteria, WS, gRPC) strips flow to "", so when it syncs after a VLESS Reality inbound the column is wiped, and the hydrate endpoint returned that empty value — the edit form loaded a blank flow for multi-inbound clients (#4792).

Derive the hydrate flow from the first flow-capable client_inbounds.flow_override instead, which is always correct and order-independent. A non-empty guard in SyncInbound was rejected because it would make flow impossible to clear.

Closes #4792
This commit is contained in:
MHSanaei
2026-06-02 15:32:48 +02:00
parent c9abda7ab8
commit 1e3c186b2c
3 changed files with 128 additions and 0 deletions
+6
View File
@@ -93,6 +93,12 @@ func (a *ClientController) get(c *gin.Context) {
jsonMsg(c, I18nWeb(c, "get"), err)
return
}
flow, err := a.clientService.EffectiveFlow(nil, rec.Id)
if err != nil {
jsonMsg(c, I18nWeb(c, "get"), err)
return
}
rec.Flow = flow
jsonObj(c, gin.H{"client": rec, "inboundIds": inboundIds}, nil)
}