mirror of
https://github.com/netbirdio/netbird.git
synced 2024-11-23 16:43:29 +01:00
f03aadf064
Add a standard interface for the client firewall to support ACL.
25 lines
633 B
Go
25 lines
633 B
Go
package firewall
|
|
|
|
// PortProtocol is the protocol of the port
|
|
type PortProtocol string
|
|
|
|
const (
|
|
// PortProtocolTCP is the TCP protocol
|
|
PortProtocolTCP PortProtocol = "tcp"
|
|
|
|
// PortProtocolUDP is the UDP protocol
|
|
PortProtocolUDP PortProtocol = "udp"
|
|
)
|
|
|
|
// Port of the address for firewall rule
|
|
type Port struct {
|
|
// IsRange is true Values contains two values, the first is the start port, the second is the end port
|
|
IsRange bool
|
|
|
|
// Values contains one value for single port, multiple values for the list of ports, or two values for the range of ports
|
|
Values []int
|
|
|
|
// Proto is the protocol of the port
|
|
Proto PortProtocol
|
|
}
|