windows: adopt GP-managed NRPT catch-all

This commit is contained in:
Dev Scribe
2026-08-21 14:46:44 +07:00
committed by Cuong Manh Le
parent 779fe015f0
commit 4d026d836c
13 changed files with 3627 additions and 294 deletions
+1 -7
View File
@@ -130,13 +130,7 @@ func (p *prog) serveDNS(listenerNum string) error {
// signal the prober and respond NXDOMAIN. Used by both macOS pf probes
// (_pf-probe-*) and Windows NRPT probes (_nrpt-probe-*) to verify that
// DNS interception is actually routing queries to ctrld's listener.
if probeID, ok := p.pfProbeExpected.Load().(string); ok && probeID != "" && domain == probeID {
if chPtr, ok := p.pfProbeCh.Load().(*chan struct{}); ok && chPtr != nil {
select {
case *chPtr <- struct{}{}:
default:
}
}
if p.signalInterceptProbe(domain) {
answer := new(dns.Msg)
answer.SetRcode(m, dns.RcodeNameError) // NXDOMAIN
_ = w.WriteMsg(answer)