chore: setting sniffHost value

This commit is contained in:
Skyxim 2023-02-10 13:01:53 +08:00
parent a991bf9045
commit 4643b5835e

View file

@ -94,15 +94,11 @@ func (sd *SnifferDispatcher) TCPSniff(conn net.Conn, metadata *C.Metadata) {
}
func (sd *SnifferDispatcher) replaceDomain(metadata *C.Metadata, host string, overrideDest bool) {
originHost := metadata.Host
if originHost != host {
metadata.SniffHost = host
if overrideDest {
metadata.Host = host
} else {
metadata.SniffHost = host
}
metadata.DNSMode = C.DNSNormal
}
log.Debugln("[Sniffer] Sniff TCP [%s]-->[%s] success, replace domain [%s]-->[%s]",
metadata.SourceDetail(),
metadata.RemoteAddress(),