mirror of
https://github.com/1f349/orchid.git
synced 2024-11-09 14:52:58 +00:00
Add duckdns provider
This commit is contained in:
parent
455d82c6d2
commit
8b9b503741
@ -15,6 +15,7 @@ import (
|
|||||||
"github.com/go-acme/lego/v4/challenge"
|
"github.com/go-acme/lego/v4/challenge"
|
||||||
"github.com/go-acme/lego/v4/challenge/dns01"
|
"github.com/go-acme/lego/v4/challenge/dns01"
|
||||||
"github.com/go-acme/lego/v4/lego"
|
"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/providers/dns/namesilo"
|
||||||
"github.com/go-acme/lego/v4/registration"
|
"github.com/go-acme/lego/v4/registration"
|
||||||
"io"
|
"io"
|
||||||
@ -298,8 +299,14 @@ func (s *Service) setupLegoClient(localData *localCertData) (*lego.Client, error
|
|||||||
|
|
||||||
func (s *Service) getDnsProvider(name, token string) (challenge.Provider, error) {
|
func (s *Service) getDnsProvider(name, token string) (challenge.Provider, error) {
|
||||||
switch name {
|
switch name {
|
||||||
|
case "duckdns":
|
||||||
|
config := duckdns.NewDefaultConfig()
|
||||||
|
config.Token = token
|
||||||
|
return duckdns.NewDNSProviderConfig(config)
|
||||||
case "namesilo":
|
case "namesilo":
|
||||||
return namesilo.NewDNSProviderConfig(&namesilo.Config{APIKey: token})
|
config := namesilo.NewDefaultConfig()
|
||||||
|
config.APIKey = token
|
||||||
|
return namesilo.NewDNSProviderConfig(config)
|
||||||
default:
|
default:
|
||||||
return nil, ErrUnsupportedDNSProvider
|
return nil, ErrUnsupportedDNSProvider
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user