mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2024-11-23 18:49:21 +08:00
parent
7e677ee9fa
commit
af41e8e429
@ -15,6 +15,7 @@ import (
|
||||
"github.com/go-acme/lego/v4/challenge/dns01"
|
||||
"github.com/go-acme/lego/v4/lego"
|
||||
"github.com/go-acme/lego/v4/providers/dns/alidns"
|
||||
"github.com/go-acme/lego/v4/providers/dns/clouddns"
|
||||
"github.com/go-acme/lego/v4/providers/dns/cloudflare"
|
||||
"github.com/go-acme/lego/v4/providers/dns/dnspod"
|
||||
"github.com/go-acme/lego/v4/providers/dns/godaddy"
|
||||
@ -70,6 +71,7 @@ const (
|
||||
AliYun DnsType = "AliYun"
|
||||
Volcengine DnsType = "Volcengine"
|
||||
CloudFlare DnsType = "CloudFlare"
|
||||
CloudDns DnsType = "CloudDns"
|
||||
NameSilo DnsType = "NameSilo"
|
||||
NameCheap DnsType = "NameCheap"
|
||||
NameCom DnsType = "NameCom"
|
||||
@ -89,6 +91,8 @@ type DNSParam struct {
|
||||
APISecret string `json:"apiSecret"`
|
||||
SecretID string `json:"secretID"`
|
||||
Region string `json:"region"`
|
||||
ClientID string `json:"clientID"`
|
||||
Password string `json:"password"`
|
||||
}
|
||||
|
||||
var (
|
||||
@ -140,6 +144,15 @@ func (c *AcmeClient) UseDns(dnsType DnsType, params string, websiteSSL model.Web
|
||||
cloudflareConfig.PollingInterval = pollingInterval
|
||||
cloudflareConfig.TTL = 3600
|
||||
p, err = cloudflare.NewDNSProviderConfig(cloudflareConfig)
|
||||
case CloudDns:
|
||||
clouddnsConfig := clouddns.NewDefaultConfig()
|
||||
clouddnsConfig.ClientID = param.ClientID
|
||||
clouddnsConfig.Email = param.Email
|
||||
clouddnsConfig.Password = param.Password
|
||||
clouddnsConfig.PropagationTimeout = propagationTimeout
|
||||
clouddnsConfig.PollingInterval = pollingInterval
|
||||
clouddnsConfig.TTL = ttl
|
||||
p, err = clouddns.NewDNSProviderConfig(clouddnsConfig)
|
||||
case NameCheap:
|
||||
namecheapConfig := namecheap.NewDefaultConfig()
|
||||
namecheapConfig.APIKey = param.APIkey
|
||||
|
@ -180,6 +180,10 @@ export const DNSTypes = [
|
||||
label: 'Cloudflare',
|
||||
value: 'CloudFlare',
|
||||
},
|
||||
{
|
||||
label: 'CloudDns',
|
||||
value: 'CloudDns',
|
||||
},
|
||||
{
|
||||
label: 'NameSilo',
|
||||
value: 'NameSilo',
|
||||
|
@ -77,6 +77,17 @@
|
||||
<el-input v-model.trim="account.authorization['apiKey']"></el-input>
|
||||
</el-form-item>
|
||||
</div>
|
||||
<div v-if="account.type === 'CloudDns'">
|
||||
<el-form-item label="Client ID" prop="authorization.clientID">
|
||||
<el-input v-model.trim="account.authorization['clientID']"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="Email" prop="authorization.email">
|
||||
<el-input v-model.trim="account.authorization['email']"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="Password" prop="authorization.password">
|
||||
<el-input v-model.trim="account.authorization['password']"></el-input>
|
||||
</el-form-item>
|
||||
</div>
|
||||
<el-form-item
|
||||
label="API Key"
|
||||
prop="authorization.apiKey"
|
||||
@ -146,6 +157,9 @@ const rules = ref<any>({
|
||||
apiUser: [Rules.requiredInput],
|
||||
secretID: [Rules.requiredInput],
|
||||
region: [Rules.requiredInput],
|
||||
clientID: [Rules.requiredInput],
|
||||
email: [Rules.email],
|
||||
password: [Rules.requiredInput],
|
||||
},
|
||||
});
|
||||
const account = ref({
|
||||
|
Loading…
Reference in New Issue
Block a user