From c6c0209ad45fb7d2e45370ee3a39f2dd437603b0 Mon Sep 17 00:00:00 2001 From: "kali kaneko (leap communications)" Date: Mon, 17 May 2021 17:50:23 +0200 Subject: [feat] log dns lookup if first cert fetch fails --- pkg/vpn/diagnose.go | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 pkg/vpn/diagnose.go (limited to 'pkg/vpn/diagnose.go') diff --git a/pkg/vpn/diagnose.go b/pkg/vpn/diagnose.go new file mode 100644 index 0000000..5d12d4d --- /dev/null +++ b/pkg/vpn/diagnose.go @@ -0,0 +1,19 @@ +package vpn + +import ( + "log" + "net" +) + +func logDnsLookup(domain string) { + addrs, err := net.LookupHost(domain) + if err != nil { + log.Println("ERROR cannot resolve address:", domain) + log.Println(err) + } + + log.Println("From here,", domain, "resolves to:") + for _, addr := range addrs { + log.Println(addr) + } +} -- cgit v1.2.3