diff --git a/dnsforward/dnsforward.go b/dnsforward/dnsforward.go index 54bf659a..c8f4f86b 100644 --- a/dnsforward/dnsforward.go +++ b/dnsforward/dnsforward.go @@ -19,6 +19,7 @@ import ( const ( safeBrowsingBlockHost = "standard-block.dns.adguard.com" parentalBlockHost = "family-block.dns.adguard.com" + defaultTimeout = 10 * time.Second ) // Server is the main way to start a DNS server. @@ -75,7 +76,7 @@ func init() { defaultUpstreams := make([]upstream.Upstream, 0) for _, addr := range defaultDNS { - u, err := upstream.AddressToUpstream(addr, "") + u, err := upstream.AddressToUpstream(addr, "", defaultTimeout) if err == nil { defaultUpstreams = append(defaultUpstreams, u) } diff --git a/go.mod b/go.mod index f9e7fb74..d4f5d9ba 100644 --- a/go.mod +++ b/go.mod @@ -1,7 +1,7 @@ module github.com/AdguardTeam/AdGuardHome require ( - github.com/AdguardTeam/dnsproxy v0.9.1 + github.com/AdguardTeam/dnsproxy v0.9.2 github.com/StackExchange/wmi v0.0.0-20180725035823-b12b22c5341f // indirect github.com/ameshkov/dnscrypt v1.0.0 github.com/beefsack/go-rate v0.0.0-20180408011153-efa7637bb9b6 diff --git a/go.sum b/go.sum index 63dd1508..c8ab0ea9 100644 --- a/go.sum +++ b/go.sum @@ -2,6 +2,8 @@ github.com/AdguardTeam/dnsproxy v0.9.0 h1:doHDmVE9bV1fhiBV8rX76WWaSAB9w1H3u8WIie github.com/AdguardTeam/dnsproxy v0.9.0/go.mod h1:CKZVVknYdoHVirXqqbALEkC+DBY65yCQrzSKYS78GoE= github.com/AdguardTeam/dnsproxy v0.9.1 h1:+F6jqrVOrUjpbzhALjtbwqHfxW4M2YS3mYdhGxLXQ08= github.com/AdguardTeam/dnsproxy v0.9.1/go.mod h1:CKZVVknYdoHVirXqqbALEkC+DBY65yCQrzSKYS78GoE= +github.com/AdguardTeam/dnsproxy v0.9.2 h1:P3B2IECZejGv8sxjyLXDbCKMgWqUEFb5rq67lxXCKZ0= +github.com/AdguardTeam/dnsproxy v0.9.2/go.mod h1:CKZVVknYdoHVirXqqbALEkC+DBY65yCQrzSKYS78GoE= github.com/StackExchange/wmi v0.0.0-20180725035823-b12b22c5341f h1:5ZfJxyXo8KyX8DgGXC5B7ILL8y51fci/qYz2B4j8iLY= github.com/StackExchange/wmi v0.0.0-20180725035823-b12b22c5341f/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg= github.com/aead/chacha20 v0.0.0-20180709150244-8b13a72661da h1:KjTM2ks9d14ZYCvmHS9iAKVt9AyzRSqNU1qabPih5BY=