From a9d582cc6a7f8246b3c03a15eab7b40d02db7e70 Mon Sep 17 00:00:00 2001 From: Zack Scholl Date: Fri, 26 Mar 2021 15:39:33 -0700 Subject: [PATCH] lookup using standard dns --- src/models/constants.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/models/constants.go b/src/models/constants.go index 329f69e0..dd5b933b 100644 --- a/src/models/constants.go +++ b/src/models/constants.go @@ -35,7 +35,14 @@ func init() { func lookupIPs(address string) (ipaddress string, err error) { var publicDns = []string{"1.1.1.1", "8.8.8.8", "8.8.4.4", "1.0.0.1", "8.26.56.26", "208.67.222.222", "208.67.220.220"} - result := make(chan string, len(publicDns)) + result := make(chan string, len(publicDns)+1) + go func() { + ips, _ := net.LookupIP(address) + for _, ip := range ips { + result <- ip.String() + } + result <- "" + }() for _, dns := range publicDns { go func(dns string) { s, _ := lookupIP(address, dns)