From ea389b2dec34f5ee4fc3da61484f107b26fe5008 Mon Sep 17 00:00:00 2001 From: matt-intercom <56313638+matt-intercom@users.noreply.github.com> Date: Thu, 4 Jan 2024 16:49:06 +0000 Subject: [PATCH] Revert "add a custom interface for the resolver instead of forcing *net.Resolver (#187)" This reverts commit b979a3980a74174ee4722fe529c10c23ff744aa8. --- pkg/smokescreen/config.go | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/pkg/smokescreen/config.go b/pkg/smokescreen/config.go index a1da77aa..ec3f86a8 100644 --- a/pkg/smokescreen/config.go +++ b/pkg/smokescreen/config.go @@ -29,20 +29,13 @@ type RuleRange struct { Port int } -// Resolver implements the interface needed by smokescreen and implemented by *net.Resolver -// This will allow different resolvers to also be provided -type Resolver interface { - LookupPort(ctx context.Context, network, service string) (port int, err error) - LookupIP(ctx context.Context, network, host string) ([]net.IP, error) -} - type Config struct { Ip string Port uint16 Listener net.Listener DenyRanges []RuleRange AllowRanges []RuleRange - Resolver Resolver + Resolver *net.Resolver ConnectTimeout time.Duration ExitTimeout time.Duration MetricsClient metrics.MetricsClientInterface @@ -235,7 +228,6 @@ func NewConfig() *Config { }) return &Config{ - Resolver: &net.Resolver{}, CrlByAuthorityKeyId: make(map[string]*pkix.CertificateList), clientCasBySubjectKeyId: make(map[string]*x509.Certificate), Log: log.New(),