feat: add linsters

This commit is contained in:
Skyxim
2022-12-04 13:37:14 +08:00
parent ba884c29bd
commit 4f75201a98
49 changed files with 1018 additions and 306 deletions

View File

@ -117,21 +117,23 @@ 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 netip.Addr `json:"sourceIP"`
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 *uint32 `json:"uid"`
Process string `json:"process"`
ProcessPath string `json:"processPath"`
SpecialProxy string `json:"specialProxy"`
RemoteDst string `json:"remoteDestination"`
NetWork NetWork `json:"network"`
Type Type `json:"type"`
SrcIP netip.Addr `json:"sourceIP"`
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 *uint32 `json:"uid"`
Process string `json:"process"`
ProcessPath string `json:"processPath"`
SpecialProxy string `json:"specialProxy"`
RemoteDst string `json:"remoteDestination"`
InName string `jsson:"-"`
PreferRulesName string
}
func (m *Metadata) RemoteAddress() string {