mirror of
https://github.com/slackhq/nebula.git
synced 2026-02-15 09:14:23 +01:00
cute prototype
This commit is contained in:
15
firewall/event.go
Normal file
15
firewall/event.go
Normal file
@@ -0,0 +1,15 @@
|
||||
package firewall
|
||||
|
||||
import (
|
||||
"net/netip"
|
||||
"time"
|
||||
)
|
||||
|
||||
type Event struct {
|
||||
Packet Packet `json:"packet,omitempty"`
|
||||
At time.Time `json:"at,omitempty"`
|
||||
Remote netip.AddrPort `json:"remote,omitempty"`
|
||||
//todo cert info?
|
||||
//todo connection indexes?
|
||||
//todo underlay info would actually be amazing, for inbounds
|
||||
}
|
||||
@@ -44,7 +44,7 @@ func (fp Packet) MarshalJSON() ([]byte, error) {
|
||||
switch fp.Protocol {
|
||||
case ProtoTCP:
|
||||
proto = "tcp"
|
||||
case ProtoICMP:
|
||||
case ProtoICMP, ProtoICMPv6:
|
||||
proto = "icmp"
|
||||
case ProtoUDP:
|
||||
proto = "udp"
|
||||
|
||||
Reference in New Issue
Block a user