From dcba88e5118bd38d20f9d1b0cc08cfa2e7814b48 Mon Sep 17 00:00:00 2001 From: pocketW <104479902+pocketW@users.noreply.github.com> Date: Sat, 30 Apr 2022 13:22:42 +1000 Subject: [PATCH] fix fakedns is nil --- app/dispatcher/fakednssniffer.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/dispatcher/fakednssniffer.go b/app/dispatcher/fakednssniffer.go index ad057fe8..366b6ff5 100644 --- a/app/dispatcher/fakednssniffer.go +++ b/app/dispatcher/fakednssniffer.go @@ -15,7 +15,7 @@ import ( func newFakeDNSSniffer(ctx context.Context) (protocolSnifferWithMetadata, error) { var fakeDNSEngine dns.FakeDNSEngine { - fakeDNSEngineFeat := core.MustFromContext(ctx).GetFeature(fakeDNSEngine) + fakeDNSEngineFeat := core.MustFromContext(ctx).GetFeature((*dns.FakeDNSEngine)(nil)) if fakeDNSEngineFeat != nil { fakeDNSEngine = fakeDNSEngineFeat.(dns.FakeDNSEngine) }