From d4d49d9df5b14267c0deea4fe46717b87dfff4e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=96=E7=95=8C?= Date: Sat, 23 Sep 2023 17:49:56 +0800 Subject: [PATCH] Fix ACME DNS01 DNS challenge --- common/tls/acme.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/common/tls/acme.go b/common/tls/acme.go index 81aa6b8e..d311c279 100644 --- a/common/tls/acme.go +++ b/common/tls/acme.go @@ -90,7 +90,10 @@ func startACME(ctx context.Context, options option.InboundACMEOptions) (*tls.Con solver.DNSProvider = &cloudflare.Provider{ APIToken: dnsOptions.CloudflareOptions.APIToken, } + default: + return nil, nil, E.New("unsupported ACME DNS01 provider type: " + dnsOptions.Provider) } + acmeConfig.DNS01Solver = &solver } if options.ExternalAccount != nil && options.ExternalAccount.KeyID != "" { acmeConfig.ExternalAccount = (*acme.EAB)(options.ExternalAccount)