From 8b9b50374122744112c2123dc0bae81754a24730 Mon Sep 17 00:00:00 2001 From: MrMelon54 Date: Fri, 30 Jun 2023 00:06:46 +0100 Subject: [PATCH] Add duckdns provider --- renewal/service.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/renewal/service.go b/renewal/service.go index f60924d..fd8a22d 100644 --- a/renewal/service.go +++ b/renewal/service.go @@ -15,6 +15,7 @@ import ( "github.com/go-acme/lego/v4/challenge" "github.com/go-acme/lego/v4/challenge/dns01" "github.com/go-acme/lego/v4/lego" + "github.com/go-acme/lego/v4/providers/dns/duckdns" "github.com/go-acme/lego/v4/providers/dns/namesilo" "github.com/go-acme/lego/v4/registration" "io" @@ -298,8 +299,14 @@ func (s *Service) setupLegoClient(localData *localCertData) (*lego.Client, error func (s *Service) getDnsProvider(name, token string) (challenge.Provider, error) { switch name { + case "duckdns": + config := duckdns.NewDefaultConfig() + config.Token = token + return duckdns.NewDNSProviderConfig(config) case "namesilo": - return namesilo.NewDNSProviderConfig(&namesilo.Config{APIKey: token}) + config := namesilo.NewDefaultConfig() + config.APIKey = token + return namesilo.NewDNSProviderConfig(config) default: return nil, ErrUnsupportedDNSProvider }