iptables

package
v3.10.0-beta.1 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2021 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Overview

Package iptables contains code for managing firewall rules. This package really only works reliably on Linux. In all other systems the functionality in here is just a set of stubs returning errors.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CensoringPolicy

type CensoringPolicy struct {
	DropIPs            []string // drop IP traffic to these IPs
	DropKeywordsHex    []string // drop IP packets with these hex keywords
	DropKeywords       []string // drop IP packets with these keywords
	HijackDNSAddress   string   // where to hijack DNS to
	HijackHTTPSAddress string   // where to hijack HTTPS to
	HijackHTTPAddress  string   // where to hijack HTTP to
	ResetIPs           []string // RST TCP/IP traffic to these IPs
	ResetKeywordsHex   []string // RST TCP/IP flows with these hex keywords
	ResetKeywords      []string // RST TCP/IP flows with these keywords
	// contains filtered or unexported fields
}

CensoringPolicy implements a censoring policy.

func NewCensoringPolicy

func NewCensoringPolicy() *CensoringPolicy

NewCensoringPolicy returns a new censoring policy.

func (*CensoringPolicy) Apply

func (c *CensoringPolicy) Apply() (err error)

Apply applies the censorship policy

func (*CensoringPolicy) Waive

func (c *CensoringPolicy) Waive() error

Waive removes any censorship policy

Jump to

Keyboard shortcuts

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