cmd/cli: do not send test query to external upstreams

This commit is contained in:
Cuong Manh Le
2023-12-05 23:51:00 +07:00
committed by Cuong Manh Le
parent 7591a0ccc6
commit 8939debbc0

View File

@@ -60,6 +60,11 @@ func (p *prog) checkDnsLoop() {
if p.um.isDown("upstream." + n) {
continue
}
// Do not send test query to external upstream.
if !canBeLocalUpstream(uc.Domain) {
mainLog.Load().Debug().Msgf("skipping external: upstream.%s", n)
continue
}
uid := uc.UID()
p.loop[uid] = false
upstream[uid] = uc