diff --git a/middleware/httpproxy/google.go b/middleware/httpproxy/google.go index ff8d83fbf..68186c232 100644 --- a/middleware/httpproxy/google.go +++ b/middleware/httpproxy/google.go @@ -109,13 +109,8 @@ func (g *google) OnStartup() error { if err != nil { return err } - r.SetQuestion(dns.Fqdn(ghost), dns.TypeAAAA) - new6, err := g.lookup(r) - if err != nil { - return err - } - up, _ := newSimpleUpstream(append(new, new6...)) + up, _ := newSimpleUpstream(new) g.Lock() g.addr = up g.Unlock() @@ -133,14 +128,8 @@ func (g *google) OnStartup() error { log.Printf("[WARNING] Failed to lookup A records %q: %s", ghost, err) continue } - r.SetQuestion(dns.Fqdn(ghost), dns.TypeAAAA) - new6, err := g.lookup(r) - if err != nil { - log.Printf("[WARNING] Failed to lookup AAAA records %q: %s", ghost, err) - continue - } - up, _ := newSimpleUpstream(append(new, new6...)) + up, _ := newSimpleUpstream(new) g.Lock() g.addr = up g.Unlock() @@ -188,9 +177,6 @@ func (g *google) lookup(r *dns.Msg) ([]string, error) { if a, ok := an.(*dns.A); ok { ret = append(ret, net.JoinHostPort(a.A.String(), "443")) } - if a, ok := an.(*dns.AAAA); ok { - ret = append(ret, net.JoinHostPort(a.AAAA.String(), "443")) - } } if len(ret) > 0 { return ret, nil