egressx

package
v0.17.0 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BlockedCIDRs

func BlockedCIDRs() []string

func LoopbackAllowCIDRs added in v0.5.0

func LoopbackAllowCIDRs() []string

LoopbackAllowCIDRs is the loopback-only subset of the allow presets (P1-3, orkome pack rollout): 127.0.0.0/8 + ::1, deliberately WITHOUT the rest of RFC1918 or link-local — the shape local integration tests against a loopback pack/dev server want. NewGuard(LoopbackAllowCIDRs()) keeps every other private range blocked. Production allowlists should enumerate the exact destinations they need, not widen further.

func NewHTTPClient

func NewHTTPClient(opts Opts) (*http.Client, error)

func PrivateAllowCIDRs

func PrivateAllowCIDRs() []string

Types

type Guard

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

func DefaultGuard

func DefaultGuard() *Guard

func GuardOf

func GuardOf(c *http.Client) *Guard

func NewGuard

func NewGuard(extraAllowCIDRs []string) (*Guard, error)

func (*Guard) ValidateURL

func (g *Guard) ValidateURL(ctx context.Context, raw string) error

type Opts

type Opts struct {
	Timeout time.Duration

	AllowCIDRs []string

	DisableEnvProxy bool

	Resolver *net.Resolver
}

Jump to

Keyboard shortcuts

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