Chore: move find connection process to tunnel (#2016)
This commit is contained in:
@ -63,15 +63,16 @@ func (t Type) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// Metadata is used to store connection address
|
||||
type Metadata struct {
|
||||
NetWork NetWork `json:"network"`
|
||||
Type Type `json:"type"`
|
||||
SrcIP net.IP `json:"sourceIP"`
|
||||
DstIP net.IP `json:"destinationIP"`
|
||||
SrcPort string `json:"sourcePort"`
|
||||
DstPort string `json:"destinationPort"`
|
||||
AddrType int `json:"-"`
|
||||
Host string `json:"host"`
|
||||
DNSMode DNSMode `json:"dnsMode"`
|
||||
NetWork NetWork `json:"network"`
|
||||
Type Type `json:"type"`
|
||||
SrcIP net.IP `json:"sourceIP"`
|
||||
DstIP net.IP `json:"destinationIP"`
|
||||
SrcPort string `json:"sourcePort"`
|
||||
DstPort string `json:"destinationPort"`
|
||||
AddrType int `json:"-"`
|
||||
Host string `json:"host"`
|
||||
DNSMode DNSMode `json:"dnsMode"`
|
||||
ProcessPath string `json:"processPath"`
|
||||
}
|
||||
|
||||
func (m *Metadata) RemoteAddress() string {
|
||||
|
@ -11,6 +11,7 @@ const (
|
||||
SrcPort
|
||||
DstPort
|
||||
Process
|
||||
ProcessPath
|
||||
MATCH
|
||||
)
|
||||
|
||||
@ -36,6 +37,8 @@ func (rt RuleType) String() string {
|
||||
return "DstPort"
|
||||
case Process:
|
||||
return "Process"
|
||||
case ProcessPath:
|
||||
return "ProcessPath"
|
||||
case MATCH:
|
||||
return "Match"
|
||||
default:
|
||||
@ -49,4 +52,5 @@ type Rule interface {
|
||||
Adapter() string
|
||||
Payload() string
|
||||
ShouldResolveIP() bool
|
||||
ShouldFindProcess() bool
|
||||
}
|
||||
|
Reference in New Issue
Block a user