caddy icon indicating copy to clipboard operation
caddy copied to clipboard

Add global resolvers directive for DNS challenge configuration

Open Siomachkin opened this issue 3 months ago • 2 comments

This PR adds support for a global resolvers directive in the Caddyfile to configure DNS resolvers for ACME DNS challenges at the global level, addressing issue #7192.

Changes

  • Added resolvers global option that accepts one or more DNS resolver addresses
  • Global resolvers are stored in the TLS app configuration
  • Resolvers are automatically applied to ACME issuers that use DNS challenges
  • Local resolvers directive in tls blocks can override global settings

Assistance Disclosure

I consulted Claude to understand the project architecture.

Siomachkin avatar Oct 09 '25 17:10 Siomachkin

Thanks for the PR. I suppose there are many places we would need to apply the resolver config -- not just the TLS app. We might need to also apply this to, for example, reverse proxy, etc.

If this option is truly intended to be only for the TLS app, then maybe it should be renamed to something like tls_resolver or something.

mholt avatar Oct 09 '25 21:10 mholt

Still draft? I'd like this feature, but I mirror the above comment about calling it tls_resolvers or similar.

Gunni avatar Nov 19 '25 16:11 Gunni