Help us shape the future of Go! Take the 2026 Go Developer Survey

ipmasq

package
v1.20.4 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2026 License: Apache-2.0 Imports: 13 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IPMasqAgent

type IPMasqAgent struct {
	// contains filtered or unexported fields
}

IPMasqAgent represents a state of the ip-masq-agent

func NewIPMasqAgent

func NewIPMasqAgent(logger *slog.Logger, configPath string, ipMasqMap IPMasqMap) *IPMasqAgent

func (*IPMasqAgent) NonMasqCIDRsFromConfig added in v1.19.0

func (a *IPMasqAgent) NonMasqCIDRsFromConfig() []netip.Prefix

func (*IPMasqAgent) Start

func (a *IPMasqAgent) Start() error

Start starts the ip-masq-agent goroutine which tracks the config file and updates the BPF map accordingly.

func (*IPMasqAgent) Stop

func (a *IPMasqAgent) Stop()

Stop stops the ip-masq-agent goroutine and the watcher.

func (*IPMasqAgent) Update

func (a *IPMasqAgent) Update() error

type IPMasqMap

type IPMasqMap interface {
	Update(cidr netip.Prefix) error
	Delete(cidr netip.Prefix) error
	Dump() ([]netip.Prefix, error)
}

IPMasqMap is an interface describing methods for manipulating an ipmasq map

type Ipnet

type Ipnet netip.Prefix

ipnet is a wrapper type for netip.Prefix to enable de-serialization of CIDRs

func (*Ipnet) UnmarshalJSON

func (c *Ipnet) UnmarshalJSON(json []byte) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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