iptables

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2026 License: MIT Imports: 8 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GitHubHookRules

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

GitHubHookRules -

func New

func New(ports ...int) (*GitHubHookRules, error)

New -

func (*GitHubHookRules) Cleanup

func (g *GitHubHookRules) Cleanup() error

Cleanup - remove the rules that were created

func (*GitHubHookRules) Init

func (g *GitHubHookRules) Init(ctx context.Context) error

Init - sets up iptables rules so that GitHub's webhook source IP addresses can access the given ports. This creates a separate chain named `github-hooks`

type IPAddr

type IPAddr struct {
	net.IPAddr
}

IPAddr - same as net.IPAddr, but a json.Unmarshaler and json.Marshaler

func (IPAddr) MarshalJSON

func (i IPAddr) MarshalJSON() ([]byte, error)

MarshalJSON - fulfils json.Marshaler

func (*IPAddr) UnmarshalJSON

func (i *IPAddr) UnmarshalJSON(b []byte) error

UnmarshalJSON - fulfils json.Unmarshaler

type IPNet

type IPNet struct {
	*net.IPNet
}

IPNet - same as net.IPNet, but a json.Unmarshaler and json.Marshaler

func NewIPNet

func NewIPNet(s string) (*IPNet, error)

NewIPNet -

func (*IPNet) MarshalJSON

func (i *IPNet) MarshalJSON() ([]byte, error)

MarshalJSON - fulfils json.Marshaler

func (*IPNet) UnmarshalJSON

func (i *IPNet) UnmarshalJSON(b []byte) error

UnmarshalJSON - fulfils json.Unmarshaler

Jump to

Keyboard shortcuts

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