chore: log error
This commit is contained in:
parent
f2d7db4a41
commit
4a3d53c7ee
1 changed files with 5 additions and 1 deletions
|
@ -76,9 +76,13 @@ func (sd *SnifferDispatcher) TCPSniff(conn net.Conn, metadata *C.Metadata) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (sd *SnifferDispatcher) replaceDomain(metadata *C.Metadata, host string) {
|
func (sd *SnifferDispatcher) replaceDomain(metadata *C.Metadata, host string) {
|
||||||
|
dstIP := ""
|
||||||
|
if metadata.DstIP.IsValid() {
|
||||||
|
dstIP = metadata.DstIP.String()
|
||||||
|
}
|
||||||
log.Debugln("[Sniffer] Sniff TCP [%s:%s]-->[%s:%s] success, replace domain [%s]-->[%s]",
|
log.Debugln("[Sniffer] Sniff TCP [%s:%s]-->[%s:%s] success, replace domain [%s]-->[%s]",
|
||||||
metadata.SrcIP, metadata.SrcPort,
|
metadata.SrcIP, metadata.SrcPort,
|
||||||
metadata.DstIP, metadata.DstPort,
|
dstIP, metadata.DstPort,
|
||||||
metadata.Host, host)
|
metadata.Host, host)
|
||||||
|
|
||||||
metadata.AddrType = C.AtypDomainName
|
metadata.AddrType = C.AtypDomainName
|
||||||
|
|
Loading…
Reference in a new issue