From 946a2245ccf2f96f2a7b332b593e95443291ca7d Mon Sep 17 00:00:00 2001 From: bloved Date: Fri, 15 Jan 2021 00:55:08 +0100 Subject: [PATCH] - if upstream DNS is missing fallbacks on localresponder if defined, else on "127.0.0.53:53" as last chance --- dns_client.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/dns_client.go b/dns_client.go index 65bb214..a6c7849 100644 --- a/dns_client.go +++ b/dns_client.go @@ -88,6 +88,11 @@ func oneTimeDNS(config string) (dns string) { upl := ZabovConfigs[config].ZabovDNSArray if len(upl) < 1 { + + if len(ZabovLocalResponder) > 0 { + fmt.Println("No DNS defined, fallback to local responder:", ZabovLocalResponder) + return ZabovLocalResponder + } fmt.Println("No DNS defined, using default 127.0.0.53:53. Hope it works!") return "127.0.0.53:53" }