aboutsummaryrefslogtreecommitdiff
path: root/core/dnsserver/config.go
diff options
context:
space:
mode:
Diffstat (limited to 'core/dnsserver/config.go')
-rw-r--r--core/dnsserver/config.go11
1 files changed, 8 insertions, 3 deletions
diff --git a/core/dnsserver/config.go b/core/dnsserver/config.go
index ac623838a..942d43d58 100644
--- a/core/dnsserver/config.go
+++ b/core/dnsserver/config.go
@@ -1,6 +1,8 @@
package dnsserver
import (
+ "crypto/tls"
+
"github.com/coredns/coredns/middleware"
"github.com/mholt/caddy"
@@ -21,8 +23,12 @@ type Config struct {
// First consumer is the file middleware to looks for zone files in this place.
Root string
- // Server is the server that handles this config
- Server *Server
+ // The transport we implement, normally just "dns" over TCP/UDP, but could be
+ // DNS-over-TLS or DNS-over-gRPC.
+ Transport string
+
+ // TLSConfig when listening for encrypted connections (gRPC, DNS-over-TLS).
+ TLSConfig *tls.Config
// Middleware stack.
Middleware []middleware.Middleware
@@ -50,7 +56,6 @@ func GetConfig(c *caddy.Controller) *Config {
// Note that this is order dependent and the order is defined in directives.go, i.e. if your middleware
// comes before the middleware you are checking; it will not be there (yet).
func GetMiddleware(c *caddy.Controller, name string) middleware.Handler {
- // TODO(miek): calling the handler h(nil) should be a noop...
conf := GetConfig(c)
for _, h := range conf.Middleware {
x := h(nil)