fix/optimize: reroute if necessary and add opendns as bootstrap dns

This commit is contained in:
mzz2017
2023-04-07 20:38:06 +08:00
parent efacd08910
commit 127a000058
5 changed files with 35 additions and 8 deletions

View File

@ -92,7 +92,7 @@ func NewUpstream(ctx context.Context, upstream *url.URL) (up *Upstream, err erro
return nil, fmt.Errorf("failed to resolve dns_upstream: %w", err)
}
if !ip46.Ip4.IsValid() && !ip46.Ip6.IsValid() {
return nil, fmt.Errorf("dns_upstream has no record")
return nil, fmt.Errorf("dns_upstream %v has no record", upstream.String())
}
return &Upstream{