mirror of
https://github.com/SagerNet/sing-box.git
synced 2024-11-25 18:11:28 +00:00
Fix dns sniff
This commit is contained in:
parent
14b6200fd8
commit
37b11e614c
|
@ -52,7 +52,7 @@ func DomainNameQuery(ctx context.Context, packet []byte) (*adapter.InboundContex
|
||||||
return nil, os.ErrInvalid
|
return nil, os.ErrInvalid
|
||||||
}
|
}
|
||||||
domain := question.Name.String()
|
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 &adapter.InboundContext{Protocol: C.ProtocolDNS /*, Domain: domain*/}, nil
|
||||||
}
|
}
|
||||||
return nil, os.ErrInvalid
|
return nil, os.ErrInvalid
|
||||||
|
|
Loading…
Reference in a new issue