From de54d4b08f4da182e20a0a9db0b6632936c7de61 Mon Sep 17 00:00:00 2001 From: JimhHan <50871214+JimhHan@users.noreply.github.com> Date: Wed, 17 Mar 2021 23:29:06 +0800 Subject: [PATCH] Fix: sniffer call IP() on a DomainAddress --- 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 8ecb6b28..50ed6134 100644 --- a/app/dispatcher/default.go +++ b/app/dispatcher/default.go @@ -196,7 +196,7 @@ func shouldOverride(ctx context.Context, result SniffResult, request session.Sni return true } if fakeDNSEngine != nil && protocolString != "bittorrent" && p == "fakedns" && - fakeDNSEngine.GetFakeIPRange().Contains(destination.Address.IP()) { + destination.Address.Family().IsIP() && fakeDNSEngine.GetFakeIPRange().Contains(destination.Address.IP()) { newError("Using sniffer ", protocolString, " since the fake DNS missed").WriteToLog(session.ExportIDToError(ctx)) return true }