cute prototype

This commit is contained in:
JackDoan
2026-01-23 13:12:46 -06:00
parent 0b02d982b2
commit 8bb6090ffd
9 changed files with 162 additions and 40 deletions

15
firewall/event.go Normal file
View 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
}

View File

@@ -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"