mirror of
https://github.com/mariocandela/beelzebub.git
synced 2025-07-01 18:47:26 -04:00
feat: add source ip and source port (#126)
add source ip and source port
This commit is contained in:
@ -35,12 +35,16 @@ func (tcpStrategy *TCPStrategy) Init(beelzebubServiceConfiguration parser.Beelze
|
||||
command = string(buffer[:n])
|
||||
}
|
||||
|
||||
host, port, _ := net.SplitHostPort(conn.RemoteAddr().String())
|
||||
|
||||
tr.TraceEvent(tracer.Event{
|
||||
Msg: "New TCP attempt",
|
||||
Protocol: tracer.TCP.String(),
|
||||
Command: command,
|
||||
Status: tracer.Stateless.String(),
|
||||
RemoteAddr: conn.RemoteAddr().String(),
|
||||
SourceIp: host,
|
||||
SourcePort: port,
|
||||
ID: uuid.New().String(),
|
||||
Description: beelzebubServiceConfiguration.Description,
|
||||
})
|
||||
|
Reference in New Issue
Block a user