firewall

package
v0.0.0-...-93fed14 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2024 License: BSD-3-Clause Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const SKIP_NFTABLES_ENV = "NB_SKIP_NFTABLES_CHECK"

SKIP_NFTABLES_ENV is the environment variable to skip nftables check

Variables

This section is empty.

Functions

func NewFirewall

func NewFirewall(context context.Context, iface IFaceMapper) (firewall.Manager, error)

Types

type FWType

type FWType int

FWType is the type for the firewall type

const (
	// UNKNOWN is the default value for the firewall type for unknown firewall type
	UNKNOWN FWType = iota
	// IPTABLES is the value for the iptables firewall type
	IPTABLES
	// NFTABLES is the value for the nftables firewall type
	NFTABLES
)

type IFaceMapper

type IFaceMapper interface {
	Name() string
	Address() iface.WGAddress
	IsUserspaceBind() bool
	SetFilter(iface.PacketFilter) error
}

IFaceMapper defines subset methods of interface required for manager

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL