mirror of
https://github.com/shtorm-7/sing-box-extended.git
synced 2026-08-12 13:27:11 +03:00
Add license_key support for masque and warp Cloudflare profiles
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user