From f2ca4f56e69506233b5dab1a155f9fecaf200969 Mon Sep 17 00:00:00 2001 From: Yuki Guo Date: Mon, 12 Oct 2026 15:03:07 +0800 Subject: [PATCH] feat: add Netcup DNS (#14038) --- agent/utils/ssl/dns_provider.go | 51 +++++++++++-------- frontend/src/global/mimetype.ts | 4 ++ .../website/ssl/dns-account/create/index.vue | 16 ++++++ 3 files changed, 51 insertions(+), 20 deletions(-) diff --git a/agent/utils/ssl/dns_provider.go b/agent/utils/ssl/dns_provider.go index 676954e93..28a9194a3 100644 --- a/agent/utils/ssl/dns_provider.go +++ b/agent/utils/ssl/dns_provider.go @@ -25,6 +25,7 @@ import ( "github.com/go-acme/lego/v5/providers/dns/namecheap" "github.com/go-acme/lego/v5/providers/dns/namedotcom" "github.com/go-acme/lego/v5/providers/dns/namesilo" + "github.com/go-acme/lego/v5/providers/dns/netcup" "github.com/go-acme/lego/v5/providers/dns/ovh" "github.com/go-acme/lego/v5/providers/dns/porkbun" "github.com/go-acme/lego/v5/providers/dns/rainyun" @@ -58,6 +59,7 @@ const ( NameCheap DnsType = "NameCheap" NameCom DnsType = "NameCom" NameSilo DnsType = "NameSilo" + Netcup DnsType = "Netcup" Ovh DnsType = "Ovh" PorkBun DnsType = "PorkBun" RainYun DnsType = "RainYun" @@ -72,26 +74,27 @@ const ( ) type DNSParam struct { - ID string `json:"id"` - Token string `json:"token"` - AccessKey string `json:"accessKey"` - SecretKey string `json:"secretKey"` - Email string `json:"email"` - APIkey string `json:"apiKey"` - APIUser string `json:"apiUser"` - APISecret string `json:"apiSecret"` - APIPrefix string `json:"apiPrefix"` - SecretID string `json:"secretID"` - ClientID string `json:"clientID"` - Password string `json:"password"` - Region string `json:"region"` - Username string `json:"username"` - AuthID string `json:"authID"` - SubAuthID string `json:"subAuthID"` - AuthPassword string `json:"authPassword"` - Endpoint string `json:"endpoint"` - AccessToken string `json:"accessToken"` - BaseURL string `json:"baseURL"` + ID string `json:"id"` + Token string `json:"token"` + AccessKey string `json:"accessKey"` + SecretKey string `json:"secretKey"` + Email string `json:"email"` + APIkey string `json:"apiKey"` + APIUser string `json:"apiUser"` + APISecret string `json:"apiSecret"` + APIPrefix string `json:"apiPrefix"` + SecretID string `json:"secretID"` + ClientID string `json:"clientID"` + Password string `json:"password"` + Region string `json:"region"` + Username string `json:"username"` + AuthID string `json:"authID"` + SubAuthID string `json:"subAuthID"` + AuthPassword string `json:"authPassword"` + Endpoint string `json:"endpoint"` + AccessToken string `json:"accessToken"` + BaseURL string `json:"baseURL"` + CustomerNumber string `json:"customerNumber"` } var ( @@ -164,6 +167,14 @@ func getDNSProviderConfig(dnsType DnsType, params string, httpClient *http.Clien config.PropagationTimeout = propagationTimeout config.PollingInterval = pollingInterval p, err = namesilo.NewDNSProviderConfig(config) + case Netcup: + config := newDNSProviderConfig(netcup.NewDefaultConfig(), httpClient) + config.Customer = param.CustomerNumber + config.Key = param.APIkey + config.Password = param.Password + config.PropagationTimeout = propagationTimeout + config.PollingInterval = pollingInterval + p, err = netcup.NewDNSProviderConfig(config) case Godaddy: config := newDNSProviderConfig(godaddy.NewDefaultConfig(), httpClient) config.APIKey = param.APIkey diff --git a/frontend/src/global/mimetype.ts b/frontend/src/global/mimetype.ts index 2e0612264..727ba90f5 100644 --- a/frontend/src/global/mimetype.ts +++ b/frontend/src/global/mimetype.ts @@ -216,6 +216,10 @@ export const DNSTypes = [ label: 'NameSilo', value: 'NameSilo', }, + { + label: 'Netcup', + value: 'Netcup', + }, { label: 'NameCheap', value: 'NameCheap', diff --git a/frontend/src/views/website/ssl/dns-account/create/index.vue b/frontend/src/views/website/ssl/dns-account/create/index.vue index 7c3122ad9..ef4f2ec47 100644 --- a/frontend/src/views/website/ssl/dns-account/create/index.vue +++ b/frontend/src/views/website/ssl/dns-account/create/index.vue @@ -110,6 +110,21 @@ +
+ + + + + + + + + +
@@ -245,6 +260,7 @@ const rules = ref({ apiPrefix: [Rules.requiredInput], username: [Rules.requiredInput], password: [Rules.requiredInput], + customerNumber: [Rules.requiredInput], }, }); const account = ref({