From fe0ccdfec86626ff0f23170b45df5cd54907f236 Mon Sep 17 00:00:00 2001 From: wweir Date: Sun, 2 Dec 2018 09:45:41 +0800 Subject: [PATCH] Fix bestTry logic --- conf/sower.toml | 4 ++-- dns/dns.go | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/conf/sower.toml b/conf/sower.toml index 314a1f2..1633fa1 100644 --- a/conf/sower.toml +++ b/conf/sower.toml @@ -28,10 +28,10 @@ blocklist=[ "*.atlassian.net", # atlassian "*.atlassian.com", "*.prod.public.atl-paas.net", - "*.cloudfront.net", + "*.cloudfront.net", "*.golang.org", # golang "go.googlesource.com", - "gist.github.com", + "gist.github.com", "*.k8s.io", "*.wikipedia.org", # wikipeida "*.wikimedia.org", diff --git a/dns/dns.go b/dns/dns.go index e4d1d25..3407cbc 100644 --- a/dns/dns.go +++ b/dns/dns.go @@ -48,6 +48,7 @@ func bestTry(w dns.ResponseWriter, r *dns.Msg, domain, dnsServer string) { ip = "[" + msg.Answer[0].(*dns.AAAA).AAAA.String() + "]" default: w.WriteMsg(msg) + return } if _, err := net.DialTimeout("tcp", ip+":http", time.Second); err != nil {