fix: reverse error when force is false
This commit is contained in:
parent
7c23fa2bd4
commit
9d364f66e9
1 changed files with 2 additions and 2 deletions
|
@ -32,7 +32,7 @@ func (sd *SnifferDispatcher) forceReplace(conn *CN.BufferedConn, metadata *C.Met
|
||||||
log.Debugln("[Sniffer]All sniffing sniff failed with from [%s:%s] to [%s:%s]", metadata.SrcIP, metadata.SrcPort, metadata.DstIP, metadata.DstPort)
|
log.Debugln("[Sniffer]All sniffing sniff failed with from [%s:%s] to [%s:%s]", metadata.SrcIP, metadata.SrcPort, metadata.DstIP, metadata.DstPort)
|
||||||
return
|
return
|
||||||
} else {
|
} else {
|
||||||
if sd.force && sd.inReverse(host) {
|
if sd.inReverse(host) {
|
||||||
log.Debugln("[Sniffer]Skip replace host:%s", host)
|
log.Debugln("[Sniffer]Skip replace host:%s", host)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -42,7 +42,7 @@ func (sd *SnifferDispatcher) forceReplace(conn *CN.BufferedConn, metadata *C.Met
|
||||||
}
|
}
|
||||||
|
|
||||||
func (sd *SnifferDispatcher) replace(conn *CN.BufferedConn, metadata *C.Metadata) {
|
func (sd *SnifferDispatcher) replace(conn *CN.BufferedConn, metadata *C.Metadata) {
|
||||||
if metadata.Host != "" && sd.inReverse(metadata.Host) {
|
if metadata.Host != "" && !sd.inReverse(metadata.Host) {
|
||||||
log.Debugln("[Sniffer]Skip Sniff domain:%s", metadata.Host)
|
log.Debugln("[Sniffer]Skip Sniff domain:%s", metadata.Host)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue