2019-03-11 16:56:48 +00:00
|
|
|
package dns
|
2016-11-18 13:12:13 +00:00
|
|
|
|
|
|
|
import (
|
|
|
|
"fmt"
|
|
|
|
|
2020-09-02 01:20:01 +00:00
|
|
|
"github.com/go-acme/lego/v4/challenge"
|
|
|
|
"github.com/go-acme/lego/v4/challenge/dns01"
|
|
|
|
"github.com/go-acme/lego/v4/providers/dns/acmedns"
|
|
|
|
"github.com/go-acme/lego/v4/providers/dns/alidns"
|
|
|
|
"github.com/go-acme/lego/v4/providers/dns/arvancloud"
|
|
|
|
"github.com/go-acme/lego/v4/providers/dns/auroradns"
|
|
|
|
"github.com/go-acme/lego/v4/providers/dns/autodns"
|
|
|
|
"github.com/go-acme/lego/v4/providers/dns/azure"
|
|
|
|
"github.com/go-acme/lego/v4/providers/dns/bindman"
|
|
|
|
"github.com/go-acme/lego/v4/providers/dns/bluecat"
|
|
|
|
"github.com/go-acme/lego/v4/providers/dns/checkdomain"
|
|
|
|
"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/cloudns"
|
|
|
|
"github.com/go-acme/lego/v4/providers/dns/cloudxns"
|
|
|
|
"github.com/go-acme/lego/v4/providers/dns/conoha"
|
|
|
|
"github.com/go-acme/lego/v4/providers/dns/constellix"
|
|
|
|
"github.com/go-acme/lego/v4/providers/dns/desec"
|
|
|
|
"github.com/go-acme/lego/v4/providers/dns/designate"
|
|
|
|
"github.com/go-acme/lego/v4/providers/dns/digitalocean"
|
|
|
|
"github.com/go-acme/lego/v4/providers/dns/dnsimple"
|
|
|
|
"github.com/go-acme/lego/v4/providers/dns/dnsmadeeasy"
|
|
|
|
"github.com/go-acme/lego/v4/providers/dns/dnspod"
|
|
|
|
"github.com/go-acme/lego/v4/providers/dns/dode"
|
2021-02-08 19:13:21 +00:00
|
|
|
"github.com/go-acme/lego/v4/providers/dns/domeneshop"
|
2020-09-02 01:20:01 +00:00
|
|
|
"github.com/go-acme/lego/v4/providers/dns/dreamhost"
|
|
|
|
"github.com/go-acme/lego/v4/providers/dns/duckdns"
|
|
|
|
"github.com/go-acme/lego/v4/providers/dns/dyn"
|
|
|
|
"github.com/go-acme/lego/v4/providers/dns/dynu"
|
|
|
|
"github.com/go-acme/lego/v4/providers/dns/easydns"
|
|
|
|
"github.com/go-acme/lego/v4/providers/dns/edgedns"
|
|
|
|
"github.com/go-acme/lego/v4/providers/dns/exec"
|
|
|
|
"github.com/go-acme/lego/v4/providers/dns/exoscale"
|
|
|
|
"github.com/go-acme/lego/v4/providers/dns/gandi"
|
|
|
|
"github.com/go-acme/lego/v4/providers/dns/gandiv5"
|
|
|
|
"github.com/go-acme/lego/v4/providers/dns/gcloud"
|
|
|
|
"github.com/go-acme/lego/v4/providers/dns/glesys"
|
|
|
|
"github.com/go-acme/lego/v4/providers/dns/godaddy"
|
|
|
|
"github.com/go-acme/lego/v4/providers/dns/hetzner"
|
|
|
|
"github.com/go-acme/lego/v4/providers/dns/hostingde"
|
|
|
|
"github.com/go-acme/lego/v4/providers/dns/httpreq"
|
2021-02-14 15:33:52 +00:00
|
|
|
"github.com/go-acme/lego/v4/providers/dns/hurricane"
|
2020-09-02 01:20:01 +00:00
|
|
|
"github.com/go-acme/lego/v4/providers/dns/hyperone"
|
|
|
|
"github.com/go-acme/lego/v4/providers/dns/iij"
|
2020-10-27 00:03:26 +00:00
|
|
|
"github.com/go-acme/lego/v4/providers/dns/infomaniak"
|
2020-09-02 01:20:01 +00:00
|
|
|
"github.com/go-acme/lego/v4/providers/dns/inwx"
|
2021-01-14 19:42:12 +00:00
|
|
|
"github.com/go-acme/lego/v4/providers/dns/ionos"
|
2020-09-02 01:20:01 +00:00
|
|
|
"github.com/go-acme/lego/v4/providers/dns/joker"
|
|
|
|
"github.com/go-acme/lego/v4/providers/dns/lightsail"
|
|
|
|
"github.com/go-acme/lego/v4/providers/dns/linode"
|
|
|
|
"github.com/go-acme/lego/v4/providers/dns/liquidweb"
|
2020-12-26 16:22:01 +00:00
|
|
|
"github.com/go-acme/lego/v4/providers/dns/loopia"
|
2020-09-02 01:20:01 +00:00
|
|
|
"github.com/go-acme/lego/v4/providers/dns/luadns"
|
|
|
|
"github.com/go-acme/lego/v4/providers/dns/mydnsjp"
|
|
|
|
"github.com/go-acme/lego/v4/providers/dns/mythicbeasts"
|
|
|
|
"github.com/go-acme/lego/v4/providers/dns/namecheap"
|
|
|
|
"github.com/go-acme/lego/v4/providers/dns/namedotcom"
|
|
|
|
"github.com/go-acme/lego/v4/providers/dns/namesilo"
|
|
|
|
"github.com/go-acme/lego/v4/providers/dns/netcup"
|
|
|
|
"github.com/go-acme/lego/v4/providers/dns/netlify"
|
|
|
|
"github.com/go-acme/lego/v4/providers/dns/nifcloud"
|
2021-02-19 20:23:48 +00:00
|
|
|
"github.com/go-acme/lego/v4/providers/dns/njalla"
|
2020-09-02 01:20:01 +00:00
|
|
|
"github.com/go-acme/lego/v4/providers/dns/ns1"
|
|
|
|
"github.com/go-acme/lego/v4/providers/dns/oraclecloud"
|
|
|
|
"github.com/go-acme/lego/v4/providers/dns/otc"
|
|
|
|
"github.com/go-acme/lego/v4/providers/dns/ovh"
|
|
|
|
"github.com/go-acme/lego/v4/providers/dns/pdns"
|
|
|
|
"github.com/go-acme/lego/v4/providers/dns/rackspace"
|
|
|
|
"github.com/go-acme/lego/v4/providers/dns/regru"
|
|
|
|
"github.com/go-acme/lego/v4/providers/dns/rfc2136"
|
|
|
|
"github.com/go-acme/lego/v4/providers/dns/rimuhosting"
|
|
|
|
"github.com/go-acme/lego/v4/providers/dns/route53"
|
|
|
|
"github.com/go-acme/lego/v4/providers/dns/sakuracloud"
|
|
|
|
"github.com/go-acme/lego/v4/providers/dns/scaleway"
|
|
|
|
"github.com/go-acme/lego/v4/providers/dns/selectel"
|
|
|
|
"github.com/go-acme/lego/v4/providers/dns/servercow"
|
|
|
|
"github.com/go-acme/lego/v4/providers/dns/stackpath"
|
|
|
|
"github.com/go-acme/lego/v4/providers/dns/transip"
|
|
|
|
"github.com/go-acme/lego/v4/providers/dns/vegadns"
|
|
|
|
"github.com/go-acme/lego/v4/providers/dns/versio"
|
2021-04-10 14:18:48 +00:00
|
|
|
"github.com/go-acme/lego/v4/providers/dns/vinyldns"
|
2020-09-02 01:20:01 +00:00
|
|
|
"github.com/go-acme/lego/v4/providers/dns/vscale"
|
|
|
|
"github.com/go-acme/lego/v4/providers/dns/vultr"
|
|
|
|
"github.com/go-acme/lego/v4/providers/dns/yandex"
|
|
|
|
"github.com/go-acme/lego/v4/providers/dns/zoneee"
|
|
|
|
"github.com/go-acme/lego/v4/providers/dns/zonomi"
|
2016-11-18 13:12:13 +00:00
|
|
|
)
|
|
|
|
|
2020-05-08 17:35:25 +00:00
|
|
|
// NewDNSChallengeProviderByName Factory for DNS providers.
|
2018-12-06 21:50:17 +00:00
|
|
|
func NewDNSChallengeProviderByName(name string) (challenge.Provider, error) {
|
2016-11-18 13:12:13 +00:00
|
|
|
switch name {
|
2018-07-09 17:28:01 +00:00
|
|
|
case "acme-dns":
|
|
|
|
return acmedns.NewDNSProvider()
|
2018-09-08 13:17:23 +00:00
|
|
|
case "alidns":
|
|
|
|
return alidns.NewDNSProvider()
|
2020-05-28 14:57:29 +00:00
|
|
|
case "arvancloud":
|
|
|
|
return arvancloud.NewDNSProvider()
|
2016-11-18 13:12:13 +00:00
|
|
|
case "azure":
|
2018-06-21 17:06:16 +00:00
|
|
|
return azure.NewDNSProvider()
|
2016-11-18 13:12:13 +00:00
|
|
|
case "auroradns":
|
2018-06-21 17:06:16 +00:00
|
|
|
return auroradns.NewDNSProvider()
|
2019-11-01 10:20:34 +00:00
|
|
|
case "autodns":
|
|
|
|
return autodns.NewDNSProvider()
|
2019-04-27 16:50:40 +00:00
|
|
|
case "bindman":
|
|
|
|
return bindman.NewDNSProvider()
|
2018-04-03 02:50:15 +00:00
|
|
|
case "bluecat":
|
2018-06-21 17:06:16 +00:00
|
|
|
return bluecat.NewDNSProvider()
|
2019-12-07 22:59:59 +00:00
|
|
|
case "checkdomain":
|
|
|
|
return checkdomain.NewDNSProvider()
|
2020-04-24 01:13:25 +00:00
|
|
|
case "clouddns":
|
|
|
|
return clouddns.NewDNSProvider()
|
2016-11-18 13:12:13 +00:00
|
|
|
case "cloudflare":
|
2018-06-21 17:06:16 +00:00
|
|
|
return cloudflare.NewDNSProvider()
|
2019-03-01 18:09:00 +00:00
|
|
|
case "cloudns":
|
|
|
|
return cloudns.NewDNSProvider()
|
2018-02-02 19:41:35 +00:00
|
|
|
case "cloudxns":
|
2018-06-21 17:06:16 +00:00
|
|
|
return cloudxns.NewDNSProvider()
|
2018-11-02 01:30:09 +00:00
|
|
|
case "conoha":
|
|
|
|
return conoha.NewDNSProvider()
|
2020-02-25 20:56:40 +00:00
|
|
|
case "constellix":
|
|
|
|
return constellix.NewDNSProvider()
|
2020-05-06 23:27:35 +00:00
|
|
|
case "desec":
|
|
|
|
return desec.NewDNSProvider()
|
2019-02-07 15:10:07 +00:00
|
|
|
case "designate":
|
|
|
|
return designate.NewDNSProvider()
|
2016-11-18 13:12:13 +00:00
|
|
|
case "digitalocean":
|
2018-06-21 17:06:16 +00:00
|
|
|
return digitalocean.NewDNSProvider()
|
2016-11-18 13:12:13 +00:00
|
|
|
case "dnsimple":
|
2018-06-21 17:06:16 +00:00
|
|
|
return dnsimple.NewDNSProvider()
|
2016-11-18 13:12:13 +00:00
|
|
|
case "dnsmadeeasy":
|
2018-06-21 17:06:16 +00:00
|
|
|
return dnsmadeeasy.NewDNSProvider()
|
2016-11-18 13:12:13 +00:00
|
|
|
case "dnspod":
|
2018-06-21 17:06:16 +00:00
|
|
|
return dnspod.NewDNSProvider()
|
2019-03-21 10:52:01 +00:00
|
|
|
case "dode":
|
|
|
|
return dode.NewDNSProvider()
|
2021-02-08 19:13:21 +00:00
|
|
|
case "domeneshop", "domainnameshop":
|
|
|
|
return domeneshop.NewDNSProvider()
|
2018-10-13 14:01:46 +00:00
|
|
|
case "dreamhost":
|
|
|
|
return dreamhost.NewDNSProvider()
|
2018-04-02 14:02:54 +00:00
|
|
|
case "duckdns":
|
2018-06-21 17:06:16 +00:00
|
|
|
return duckdns.NewDNSProvider()
|
2016-11-18 13:12:13 +00:00
|
|
|
case "dyn":
|
2018-06-21 17:06:16 +00:00
|
|
|
return dyn.NewDNSProvider()
|
2020-03-10 11:31:33 +00:00
|
|
|
case "dynu":
|
|
|
|
return dynu.NewDNSProvider()
|
2019-04-29 00:03:04 +00:00
|
|
|
case "easydns":
|
|
|
|
return easydns.NewDNSProvider()
|
2020-09-02 00:56:43 +00:00
|
|
|
case "edgedns", "fastdns": // "fastdns" is for compatibility with v3, must be dropped in v5
|
|
|
|
return edgedns.NewDNSProvider()
|
2018-10-04 15:28:06 +00:00
|
|
|
case "exec":
|
|
|
|
return exec.NewDNSProvider()
|
2016-11-18 13:12:13 +00:00
|
|
|
case "exoscale":
|
2018-06-21 17:06:16 +00:00
|
|
|
return exoscale.NewDNSProvider()
|
2016-11-18 13:12:13 +00:00
|
|
|
case "gandi":
|
2018-06-21 17:06:16 +00:00
|
|
|
return gandi.NewDNSProvider()
|
2018-02-02 19:22:33 +00:00
|
|
|
case "gandiv5":
|
2018-06-21 17:06:16 +00:00
|
|
|
return gandiv5.NewDNSProvider()
|
2018-03-31 14:33:48 +00:00
|
|
|
case "glesys":
|
2018-06-21 17:06:16 +00:00
|
|
|
return glesys.NewDNSProvider()
|
2016-11-18 13:12:13 +00:00
|
|
|
case "gcloud":
|
2018-06-21 17:06:16 +00:00
|
|
|
return gcloud.NewDNSProvider()
|
2017-10-25 19:55:29 +00:00
|
|
|
case "godaddy":
|
2018-06-21 17:06:16 +00:00
|
|
|
return godaddy.NewDNSProvider()
|
2020-05-08 12:26:30 +00:00
|
|
|
case "hetzner":
|
|
|
|
return hetzner.NewDNSProvider()
|
2018-09-15 21:25:14 +00:00
|
|
|
case "hostingde":
|
|
|
|
return hostingde.NewDNSProvider()
|
2018-11-09 00:53:21 +00:00
|
|
|
case "httpreq":
|
|
|
|
return httpreq.NewDNSProvider()
|
2021-02-14 15:33:52 +00:00
|
|
|
case "hurricane":
|
|
|
|
return hurricane.NewDNSProvider()
|
2020-08-24 21:50:52 +00:00
|
|
|
case "hyperone":
|
|
|
|
return hyperone.NewDNSProvider()
|
2018-09-08 10:52:36 +00:00
|
|
|
case "iij":
|
|
|
|
return iij.NewDNSProvider()
|
2020-10-27 00:03:26 +00:00
|
|
|
case "infomaniak":
|
|
|
|
return infomaniak.NewDNSProvider()
|
2018-11-06 10:49:50 +00:00
|
|
|
case "inwx":
|
|
|
|
return inwx.NewDNSProvider()
|
2021-01-14 19:42:12 +00:00
|
|
|
case "ionos":
|
|
|
|
return ionos.NewDNSProvider()
|
2019-04-28 12:33:50 +00:00
|
|
|
case "joker":
|
|
|
|
return joker.NewDNSProvider()
|
2018-02-18 15:27:58 +00:00
|
|
|
case "lightsail":
|
2018-06-21 17:06:16 +00:00
|
|
|
return lightsail.NewDNSProvider()
|
2020-09-02 00:51:04 +00:00
|
|
|
case "linode", "linodev4": // "linodev4" is for compatibility with v3, must be dropped in v5
|
2018-06-21 17:06:16 +00:00
|
|
|
return linode.NewDNSProvider()
|
2019-08-19 19:41:10 +00:00
|
|
|
case "liquidweb":
|
|
|
|
return liquidweb.NewDNSProvider()
|
2020-05-10 04:03:54 +00:00
|
|
|
case "luadns":
|
|
|
|
return luadns.NewDNSProvider()
|
2020-12-26 16:22:01 +00:00
|
|
|
case "loopia":
|
|
|
|
return loopia.NewDNSProvider()
|
2016-11-18 13:12:13 +00:00
|
|
|
case "manual":
|
2018-12-06 21:50:17 +00:00
|
|
|
return dns01.NewDNSProviderManual()
|
2018-11-04 14:37:29 +00:00
|
|
|
case "mydnsjp":
|
|
|
|
return mydnsjp.NewDNSProvider()
|
2020-04-28 07:04:22 +00:00
|
|
|
case "mythicbeasts":
|
|
|
|
return mythicbeasts.NewDNSProvider()
|
2016-11-18 13:12:13 +00:00
|
|
|
case "namecheap":
|
2018-06-21 17:06:16 +00:00
|
|
|
return namecheap.NewDNSProvider()
|
2018-03-14 17:43:09 +00:00
|
|
|
case "namedotcom":
|
2018-06-21 17:06:16 +00:00
|
|
|
return namedotcom.NewDNSProvider()
|
2019-07-05 01:38:43 +00:00
|
|
|
case "namesilo":
|
|
|
|
return namesilo.NewDNSProvider()
|
2018-09-08 12:08:07 +00:00
|
|
|
case "netcup":
|
|
|
|
return netcup.NewDNSProvider()
|
2020-05-08 10:26:44 +00:00
|
|
|
case "netlify":
|
|
|
|
return netlify.NewDNSProvider()
|
2018-07-01 00:13:22 +00:00
|
|
|
case "nifcloud":
|
|
|
|
return nifcloud.NewDNSProvider()
|
2021-02-19 20:23:48 +00:00
|
|
|
case "njalla":
|
|
|
|
return njalla.NewDNSProvider()
|
2018-10-04 15:28:06 +00:00
|
|
|
case "ns1":
|
|
|
|
return ns1.NewDNSProvider()
|
2019-02-26 14:41:02 +00:00
|
|
|
case "oraclecloud":
|
|
|
|
return oraclecloud.NewDNSProvider()
|
2018-10-04 15:28:06 +00:00
|
|
|
case "otc":
|
|
|
|
return otc.NewDNSProvider()
|
|
|
|
case "ovh":
|
|
|
|
return ovh.NewDNSProvider()
|
|
|
|
case "pdns":
|
|
|
|
return pdns.NewDNSProvider()
|
2016-11-18 13:12:13 +00:00
|
|
|
case "rackspace":
|
2018-06-21 17:06:16 +00:00
|
|
|
return rackspace.NewDNSProvider()
|
2020-03-10 10:08:32 +00:00
|
|
|
case "regru":
|
|
|
|
return regru.NewDNSProvider()
|
2016-11-18 13:12:13 +00:00
|
|
|
case "rfc2136":
|
2018-06-21 17:06:16 +00:00
|
|
|
return rfc2136.NewDNSProvider()
|
2020-03-14 12:32:50 +00:00
|
|
|
case "rimuhosting":
|
|
|
|
return rimuhosting.NewDNSProvider()
|
|
|
|
case "route53":
|
|
|
|
return route53.NewDNSProvider()
|
2018-06-21 19:24:45 +00:00
|
|
|
case "sakuracloud":
|
|
|
|
return sakuracloud.NewDNSProvider()
|
2020-01-23 14:51:47 +00:00
|
|
|
case "scaleway":
|
|
|
|
return scaleway.NewDNSProvider()
|
2018-11-04 01:36:04 +00:00
|
|
|
case "selectel":
|
|
|
|
return selectel.NewDNSProvider()
|
2020-02-25 20:41:39 +00:00
|
|
|
case "servercow":
|
|
|
|
return servercow.NewDNSProvider()
|
2020-01-23 14:51:47 +00:00
|
|
|
case "stackpath":
|
|
|
|
return stackpath.NewDNSProvider()
|
2018-11-06 10:56:28 +00:00
|
|
|
case "transip":
|
|
|
|
return transip.NewDNSProvider()
|
2018-06-30 23:45:24 +00:00
|
|
|
case "vegadns":
|
|
|
|
return vegadns.NewDNSProvider()
|
2019-06-27 17:30:10 +00:00
|
|
|
case "versio":
|
|
|
|
return versio.NewDNSProvider()
|
2018-10-04 15:28:06 +00:00
|
|
|
case "vultr":
|
|
|
|
return vultr.NewDNSProvider()
|
2021-04-10 14:18:48 +00:00
|
|
|
case "vinyldns":
|
|
|
|
return vinyldns.NewDNSProvider()
|
2018-11-08 09:31:42 +00:00
|
|
|
case "vscale":
|
|
|
|
return vscale.NewDNSProvider()
|
2020-04-27 17:58:18 +00:00
|
|
|
case "yandex":
|
|
|
|
return yandex.NewDNSProvider()
|
2019-01-20 11:27:35 +00:00
|
|
|
case "zoneee":
|
|
|
|
return zoneee.NewDNSProvider()
|
2020-03-14 12:32:50 +00:00
|
|
|
case "zonomi":
|
|
|
|
return zonomi.NewDNSProvider()
|
2016-11-18 13:12:13 +00:00
|
|
|
default:
|
2019-06-27 17:30:10 +00:00
|
|
|
return nil, fmt.Errorf("unrecognized DNS provider: %s", name)
|
2016-11-18 13:12:13 +00:00
|
|
|
}
|
|
|
|
}
|