From 37b11e614ce53e64cfc1a41a6551974ab05b1b0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=96=E7=95=8C?= Date: Tue, 2 Aug 2022 13:42:31 +0800 Subject: [PATCH] Fix dns sniff --- common/sniff/dns.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/sniff/dns.go b/common/sniff/dns.go index be9e369d..0c41b924 100644 --- a/common/sniff/dns.go +++ b/common/sniff/dns.go @@ -52,7 +52,7 @@ func DomainNameQuery(ctx context.Context, packet []byte) (*adapter.InboundContex return nil, os.ErrInvalid } domain := question.Name.String() - if question.Class == dnsmessage.ClassINET && (question.Type == dnsmessage.TypeA || question.Type == dnsmessage.TypeAAAA) && IsDomainName(domain) { + if question.Class == dnsmessage.ClassINET && IsDomainName(domain) { return &adapter.InboundContext{Protocol: C.ProtocolDNS /*, Domain: domain*/}, nil } return nil, os.ErrInvalid