mirror of
https://github.com/bjdgyc/anylink.git
synced 2025-08-08 11:10:14 +08:00
保存Lego注册信息,避免重复注册导致失败
优化动态加载TLS证书性能
This commit is contained in:
@@ -100,28 +100,35 @@ func addInitData() error {
|
||||
}
|
||||
|
||||
// SettingDnsProvider
|
||||
provider := &SettingDnsProvider{
|
||||
provider := &SettingLetsEncrypt{
|
||||
Domain: "vpn.xxx.com",
|
||||
Legomail: "legomail",
|
||||
Name: "",
|
||||
Name: "aliyun",
|
||||
Renew: false,
|
||||
AliYun: struct {
|
||||
APIKey string `json:"apiKey"`
|
||||
SecretKey string `json:"secretKey"`
|
||||
}{APIKey: "", SecretKey: ""},
|
||||
TXCloud: struct {
|
||||
SecretID string `json:"secretId"`
|
||||
SecretKey string `json:"secretKey"`
|
||||
}{SecretID: "", SecretKey: ""},
|
||||
CfCloud: struct {
|
||||
AuthEmail string `json:"authEmail"`
|
||||
AuthKey string `json:"authKey"`
|
||||
}{AuthEmail: "", AuthKey: ""},
|
||||
DNSProvider: DNSProvider{
|
||||
AliYun: struct {
|
||||
APIKey string `json:"apiKey"`
|
||||
SecretKey string `json:"secretKey"`
|
||||
}{APIKey: "", SecretKey: ""},
|
||||
TXCloud: struct {
|
||||
SecretID string `json:"secretId"`
|
||||
SecretKey string `json:"secretKey"`
|
||||
}{SecretID: "", SecretKey: ""},
|
||||
CfCloud: struct {
|
||||
AuthEmail string `json:"authEmail"`
|
||||
AuthKey string `json:"authKey"`
|
||||
}{AuthEmail: "", AuthKey: ""}},
|
||||
}
|
||||
err = SettingSessAdd(sess, provider)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
// LegoUser
|
||||
legouser := &LegoUserData{}
|
||||
err = SettingSessAdd(sess, legouser)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
// SettingOther
|
||||
other := &SettingOther{
|
||||
LinkAddr: "vpn.xx.com",
|
||||
|
Reference in New Issue
Block a user