firewall

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2022 License: BSD-3-Clause Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Firewall

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

func New

func New(br string, matches ...string) (*Firewall, error)

func (*Firewall) Allow

func (f *Firewall) Allow(ip net.IP) error

func (*Firewall) Channel

func (f *Firewall) Channel() chan *_dns.ResolvedName

func (*Firewall) Filter

func (f *Firewall) Filter(name string, ip net.IP) bool

func (*Firewall) RegisterHTTP

func (f *Firewall) RegisterHTTP(mux *http.ServeMux)

func (*Firewall) Setup

func (f *Firewall) Setup() (err error)

func (*Firewall) Start

func (f *Firewall) Start(ctx context.Context)

type Rule

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

Rule contrains a simple rule struct

func (*Rule) Apply

func (r *Rule) Apply(handler *iptbl.IPTables) error

Apply specified rule

Jump to

Keyboard shortcuts

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