diff --git a/pkg/resolvers/HTTPS.go b/pkg/resolvers/HTTPS.go index 79cc2ea..bb896ad 100644 --- a/pkg/resolvers/HTTPS.go +++ b/pkg/resolvers/HTTPS.go @@ -4,6 +4,7 @@ package resolvers import ( "bytes" + "crypto/tls" "fmt" "io" "net/http" @@ -26,6 +27,17 @@ func (resolver *HTTPSResolver) LookUp(msg *dns.Msg) (util.Response, error) { httpR := &http.Client{ Timeout: resolver.opts.Request.Timeout, + Transport: &http.Transport{ + MaxConnsPerHost: 1, + MaxIdleConns: 1, + MaxIdleConnsPerHost: 1, + Proxy: http.ProxyFromEnvironment, + TLSClientConfig: &tls.Config{ + //nolint:gosec // This is intentional if the user requests it + InsecureSkipVerify: resolver.opts.TLSNoVerify, + ServerName: resolver.opts.TLSHost, + }, + }, } buf, err := msg.Pack() diff --git a/pkg/resolvers/docs.go b/pkg/resolvers/docs.go new file mode 100644 index 0000000..cdec9e7 --- /dev/null +++ b/pkg/resolvers/docs.go @@ -0,0 +1,4 @@ +/* +Package resolvers contain the various DNS resolvers to use. +*/ +package resolvers