allowlist

package
v0.0.0-...-aa2490a Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2025 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Overview

Package allowlist implements allowlist routing.

Index

Constants

View Source
const (
	RuleComment = "nordvpn_allowlist"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type IPTables

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

func NewAllowlistRouting

func NewAllowlistRouting(commandFunc runCommandFunc) *IPTables

NewAllowlistRouting is a default constructor for Allowlist Routing

func (*IPTables) Disable

func (ipt *IPTables) Disable() error

Deletes allowlist routing rules

func (*IPTables) EnablePorts

func (ipt *IPTables) EnablePorts(ports []int, protocol string, mark string) error

Adds allowlist routing rules for ports

type Routing

type Routing interface {
	EnablePorts(ports []int, protocol string, mark string) error
	Disable() error
}

Jump to

Keyboard shortcuts

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