Added CoreDNS plugin setup and replaced forward

This commit is contained in:
Andrey Meshkov
2018-11-05 23:49:31 +03:00
parent 9bc4bf66ed
commit efdd1c1ff2
8 changed files with 137 additions and 25 deletions

View File

@@ -87,7 +87,7 @@ func IsAlive(u Upstream) (bool, error) {
ping := new(dns.Msg)
ping.SetQuestion("ipv4only.arpa.", dns.TypeA)
resp, err := u.Exchange(nil, ping)
resp, err := u.Exchange(context.Background(), ping)
// If we got a header, we're alright, basically only care about I/O errors 'n stuff.
if err != nil && resp != nil {