iptables

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2024 License: MIT Imports: 8 Imported by: 0

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