mirror of
https://github.com/DNSCrypt/dnscrypt-proxy.git
synced 2025-01-15 02:35:53 +01:00
cleanup: xtransport: group all consts and alike
This is mainly for case where more consts are added. Also I think those vars were not variables but treated as const.
This commit is contained in:
parent
92e632daf1
commit
ac4843b460
@ -25,7 +25,11 @@ import (
|
||||
netproxy "golang.org/x/net/proxy"
|
||||
)
|
||||
|
||||
const DefaultFallbackResolver = "9.9.9.9:53"
|
||||
const (
|
||||
DefaultFallbackResolver = "9.9.9.9:53"
|
||||
DefaultKeepAlive = 5 * time.Second
|
||||
DefaultTimeout = 30 * time.Second
|
||||
)
|
||||
|
||||
type CachedIPs struct {
|
||||
sync.RWMutex
|
||||
@ -48,9 +52,6 @@ type XTransport struct {
|
||||
httpProxyFunction func(*http.Request) (*url.URL, error)
|
||||
}
|
||||
|
||||
var DefaultKeepAlive = 5 * time.Second
|
||||
var DefaultTimeout = 30 * time.Second
|
||||
|
||||
func NewXTransport() *XTransport {
|
||||
xTransport := XTransport{
|
||||
cachedIPs: CachedIPs{cache: make(map[string]string)},
|
||||
|
Loading…
Reference in New Issue
Block a user