Fix: sniffer call IP() on a DomainAddress

This commit is contained in:
JimhHan 2021-03-17 23:29:06 +08:00
parent 32713bcc0e
commit de54d4b08f
No known key found for this signature in database
GPG Key ID: 48D5D7CF95157AC5
1 changed files with 1 additions and 1 deletions

View File

@ -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
}