policy

package
v0.1.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 21, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	IPProtoTCP = 6
	IPProtoUDP = 17
)

Variables

This section is empty.

Functions

func ParseAllowedMarks

func ParseAllowedMarks(values []string) ([]uint32, error)

func ParseAllowedV4Hosts

func ParseAllowedV4Hosts(values []string) ([]netip.Addr, error)

func ParseAllowedV6Hosts

func ParseAllowedV6Hosts(values []string) ([]netip.Addr, error)

Types

type HostPortRule

type HostPortRule struct {
	Protocol uint8
	AddrPort netip.AddrPort
}

func ParseAllowedV4Hostports

func ParseAllowedV4Hostports(values []string) ([]HostPortRule, error)

func ParseAllowedV6Hostports

func ParseAllowedV6Hostports(values []string) ([]HostPortRule, error)

type PortRule

type PortRule struct {
	Protocol uint8
	Port     uint16
}

func ParseAllowedPorts

func ParseAllowedPorts(values []string) ([]PortRule, error)