Provide better error message when self-check failed

By connecting to all upstreams when self-check failed, so it's clearer
to users what causes self-check failed.
This commit is contained in:
Cuong Manh Le
2024-03-28 18:28:38 +07:00
committed by Cuong Manh Le
parent 52954b8ceb
commit 1a8c1ec73d
3 changed files with 37 additions and 10 deletions
+1
View File
@@ -962,6 +962,7 @@ func isWanClient(na net.Addr) bool {
// resolveInternalDomainTestQuery resolves internal test domain query, returning the answer to the caller.
func resolveInternalDomainTestQuery(ctx context.Context, domain string, m *dns.Msg) *dns.Msg {
ctrld.Log(ctx, mainLog.Load().Debug(), "internal domain test query")
q := m.Question[0]
answer := new(dns.Msg)
rrStr := fmt.Sprintf("%s A %s", domain, net.IPv4zero)