From e056fb2eb98fdedc5e0caaeb04e089c4e67a8253 Mon Sep 17 00:00:00 2001 From: Eugene Bujak Date: Thu, 6 Dec 2018 17:18:44 +0300 Subject: [PATCH] Remove unused code. --- dnsfilter/dnsfilter.go | 3 --- dnsforward/upstream.go | 14 -------------- 2 files changed, 17 deletions(-) diff --git a/dnsfilter/dnsfilter.go b/dnsfilter/dnsfilter.go index 2c78a92b..cd408a4d 100644 --- a/dnsfilter/dnsfilter.go +++ b/dnsfilter/dnsfilter.go @@ -38,9 +38,6 @@ var ErrInvalidSyntax = errors.New("dnsfilter: invalid rule syntax") // ErrInvalidSyntax is returned by AddRule when the rule was already added to the filter var ErrAlreadyExists = errors.New("dnsfilter: rule was already added") -// ErrInvalidParental is returned by EnableParental when sensitivity is not a valid value -var ErrInvalidParental = errors.New("dnsfilter: invalid parental sensitivity, must be either 3, 10, 13 or 17") - const shortcutLength = 6 // used for rule search optimization, 6 hits the sweet spot const enableFastLookup = true // flag for debugging, must be true in production for faster performance diff --git a/dnsforward/upstream.go b/dnsforward/upstream.go index 99142929..4f6b18da 100644 --- a/dnsforward/upstream.go +++ b/dnsforward/upstream.go @@ -76,13 +76,6 @@ type dnsOverTLS struct { sync.RWMutex // protects pool } -var defaultTLSClient = dns.Client{ - Net: "tcp-tls", - Timeout: defaultTimeout, - UDPSize: dns.MaxMsgSize, - TLSConfig: &tls.Config{}, -} - func (p *dnsOverTLS) Address() string { return p.boot.address } func (p *dnsOverTLS) Exchange(m *dns.Msg) (*dns.Msg, error) { @@ -128,13 +121,6 @@ type dnsOverHTTPS struct { boot bootstrapper } -var defaultHTTPSTransport = http.Transport{} - -var defaultHTTPSClient = http.Client{ - Transport: &defaultHTTPSTransport, - Timeout: defaultTimeout, -} - func (p *dnsOverHTTPS) Address() string { return p.boot.address } func (p *dnsOverHTTPS) Exchange(m *dns.Msg) (*dns.Msg, error) {