mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-07-20 11:36:06 +00:00
fix(warp): persist client_id so WARP outbound gets reserved bytes (#4781)
RegWarp now stores config.client_id from the Cloudflare registration, and WarpModal sources the reserved bytes from the live config response (falling back to stored creds). Previously reservedFor read an always-missing client_id, producing an empty reserved array.
This commit is contained in:
@@ -106,6 +106,11 @@ func (s *WarpService) RegWarp(secretKey string, publicKey string) (string, error
|
||||
"license_key": license,
|
||||
"private_key": secretKey,
|
||||
}
|
||||
if config, ok := rsp["config"].(map[string]any); ok {
|
||||
if clientID, ok := config["client_id"].(string); ok {
|
||||
warpData["client_id"] = clientID
|
||||
}
|
||||
}
|
||||
warpJSON, err := json.MarshalIndent(warpData, "", " ")
|
||||
if err != nil {
|
||||
return "", err
|
||||
|
||||
Reference in New Issue
Block a user