mirror of
https://github.com/speatzle/nfsense.git
synced 2025-09-13 15:19:08 +00:00
Add Address Matching
This commit is contained in:
parent
4479627a00
commit
00b5286c42
6 changed files with 110 additions and 25 deletions
|
@ -2,6 +2,7 @@ package definitions
|
|||
|
||||
import (
|
||||
"encoding/json"
|
||||
"net"
|
||||
"net/netip"
|
||||
|
||||
"go4.org/netipx"
|
||||
|
@ -12,6 +13,7 @@ type Address struct {
|
|||
Comment string `json:"comment,omitempty"`
|
||||
Host *netip.Addr `json:"host,omitempty"`
|
||||
Range *netipx.IPRange `json:"range,omitempty"`
|
||||
Network *net.IPNet `json:"network,omitempty"`
|
||||
Children *[]string `json:"children,omitempty"`
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
package definitions
|
||||
|
||||
type Match struct {
|
||||
TCPDestinationPort uint64 `json:"tcp_destination_port,omitempty"`
|
||||
Services []string `json:"services,omitempty"`
|
||||
TCPDestinationPort uint64 `json:"tcp_destination_port,omitempty"`
|
||||
Services []string `json:"services,omitempty"`
|
||||
SourceAddresses []string `json:"source_addresses,omitempty"`
|
||||
DestinationAddresses []string `json:"destination_addresses,omitempty"`
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue