Skip to content

Commit

Permalink
Revert "add a custom interface for the resolver instead of forcing *n…
Browse files Browse the repository at this point in the history
…et.Resolver (stripe#187)"

This reverts commit b979a39.
  • Loading branch information
matt-intercom authored Jan 4, 2024
1 parent f1cd886 commit ea389b2
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions pkg/smokescreen/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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(),
Expand Down

0 comments on commit ea389b2

Please sign in to comment.