Let's Encrypt添加Cloudflare接口,优化DNS服务商信息的存储方式和前端显示

This commit is contained in:
wsczx
2023-04-02 00:43:17 +08:00
parent 9bac773961
commit 061f6f222b
6 changed files with 478 additions and 227 deletions

View File

@@ -101,11 +101,22 @@ func addInitData() error {
// SettingDnsProvider
provider := &SettingDnsProvider{
Legomail: "legomail",
Name: "aliyun OR TXCloud",
AccessKeyID: "AccessKeyID",
AccessKeySecret: "AccessKeySecret",
Domain: "vpn.xxx.com",
Domain: "vpn.xxx.com",
Legomail: "legomail",
Name: "",
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: ""},
}
err = SettingSessAdd(sess, provider)
if err != nil {

View File

@@ -34,12 +34,23 @@ type SettingOther struct {
}
type SettingDnsProvider struct {
Legomail string `json:"legomail"`
Name string `json:"name"`
AccessKeyID string `json:"accessKeyId"`
AccessKeySecret string `json:"accessKeySecret"`
Domain string `json:"domain"`
Renew bool `json:"renew"`
Domain string `json:"domain"`
Legomail string `json:"legomail"`
Name string `json:"name"`
Renew bool `json:"renew"`
AliYun struct {
APIKey string `json:"apiKey"`
SecretKey string `json:"secretKey"`
} `json:"aliyun"`
TXCloud struct {
SecretID string `json:"secretId"`
SecretKey string `json:"secretKey"`
} `json:"txcloud"`
CfCloud struct {
AuthEmail string `json:"authEmail"`
AuthKey string `json:"authKey"`
} `json:"cfcloud"`
}
func StructName(data interface{}) string {