From 6c674c7d05daf377a34f447468730cbc4e4bfaaa Mon Sep 17 00:00:00 2001 From: Maycon Santos Date: Tue, 10 Dec 2024 15:44:08 +0100 Subject: [PATCH] add some debug logs --- client/internal/dns/server.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/client/internal/dns/server.go b/client/internal/dns/server.go index f0277319c..886e3c1a4 100644 --- a/client/internal/dns/server.go +++ b/client/internal/dns/server.go @@ -374,6 +374,8 @@ func (s *DefaultServer) buildUpstreamHandlerUpdate(nameServerGroups []*nbdns.Nam continue } + log.Debugf("received a nameserver group with %#v nameservers for %s domains", nsGroup.NameServers, nsGroup.Domains) + handler, err := newUpstreamResolver( s.ctx, s.wgInterface.Name(), @@ -444,9 +446,11 @@ func (s *DefaultServer) updateMux(muxUpdates []muxUpdate) { var isContainRootUpdate bool for _, update := range muxUpdates { + log.Debugf("registering a new handler for domain %s", update.domain) s.service.RegisterMux(update.domain, update.handler) muxUpdateMap[update.domain] = update.handler if existingHandler, ok := s.dnsMuxMap[update.domain]; ok { + log.Debugf("stopping the existing handler for domain %s", update.domain) existingHandler.stop() } @@ -462,6 +466,7 @@ func (s *DefaultServer) updateMux(muxUpdates []muxUpdate) { s.addHostRootZone() existingHandler.stop() } else { + log.Debugf("stopping the existing handler for domain %s", key) existingHandler.stop() s.service.DeregisterMux(key) }