Add license_key support for masque and warp Cloudflare profiles

This commit is contained in:
Shtorm
2026-08-11 23:36:15 +03:00
parent 6126cc2158
commit e8f6936480
7 changed files with 44 additions and 1 deletions

View File

@@ -302,6 +302,11 @@ func (w *Outbound) createConfig() (*Config, error) {
return nil, err
}
}
if w.options.Profile.LicenseKey != "" && profile.Account.License != w.options.Profile.LicenseKey {
if _, err = api.UpdateAccount(w.ctx, profile.Token, profile.ID, w.options.Profile.LicenseKey); err != nil {
return nil, E.New("failed to apply license key: ", err)
}
}
privateKey, publicKey, err := masque.GenerateEcKeyPair()
if err != nil {
return nil, E.New("failed to generate key pair: ", err)