chore: support IN-PORT rule

This commit is contained in:
wwqgtxx
2022-11-11 23:36:06 +08:00
parent 64be213b66
commit b2d7149a95
13 changed files with 60 additions and 14 deletions

View File

@ -202,3 +202,7 @@ type UDPPacket interface {
// LocalAddr returns the source IP/Port of packet
LocalAddr() net.Addr
}
type UDPPacketInAddr interface {
InAddr() net.Addr
}

View File

@ -115,6 +115,8 @@ type Metadata struct {
DstIP netip.Addr `json:"destinationIP"`
SrcPort string `json:"sourcePort"`
DstPort string `json:"destinationPort"`
InIP netip.Addr `json:"inboundIP"`
InPort string `json:"inboundPort"`
Host string `json:"host"`
DNSMode DNSMode `json:"dnsMode"`
Uid *int32 `json:"uid"`

View File

@ -13,6 +13,7 @@ const (
SrcIPSuffix
SrcPort
DstPort
InPort
Process
ProcessPath
RuleSet
@ -52,6 +53,8 @@ func (rt RuleType) String() string {
return "SrcPort"
case DstPort:
return "DstPort"
case InPort:
return "InPort"
case Process:
return "Process"
case ProcessPath: