From 215971f6ab341328f2de11da37cc36dea313b2af Mon Sep 17 00:00:00 2001 From: patterniha Date: Fri, 16 May 2025 15:41:25 +0330 Subject: [PATCH] sniffer bug: `fakedns` should not sniff tls/http/quic --- app/dispatcher/default.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/dispatcher/default.go b/app/dispatcher/default.go index 544a0956..5db92f2e 100644 --- a/app/dispatcher/default.go +++ b/app/dispatcher/default.go @@ -224,7 +224,7 @@ func (d *DefaultDispatcher) shouldOverride(ctx context.Context, result SniffResu if strings.HasPrefix(protocolString, p) || strings.HasPrefix(p, protocolString) { return true } - if fkr0, ok := d.fdns.(dns.FakeDNSEngineRev0); ok && protocolString != "bittorrent" && p == "fakedns" && + if fkr0, ok := d.fdns.(dns.FakeDNSEngineRev0); ok && protocolString != "bittorrent" && p == "fakedns+others" && fkr0.IsIPInIPPool(destination.Address) { errors.LogInfo(ctx, "Using sniffer ", protocolString, " since the fake DNS missed") return true