http

package
v0.64.0 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2022 License: MIT Imports: 7 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SafeHTTPClient

func SafeHTTPClient(client *http.Client, log logrus.FieldLogger, allowedBlocks ...*net.IPNet) *http.Client

SafeHTTPClient blocks requests to private ip ranges Deprecated: use SafeTransport instead

func SafeRoundtripper

func SafeRoundtripper(trans http.RoundTripper, log logrus.FieldLogger, allowedBlocks ...*net.IPNet) http.RoundTripper

SafeRoundtripper blocks requests to private ip ranges Deprecated: use SafeTransport instead

func SafeTransport added in v0.58.5

func SafeTransport(allowedBlocks ...*net.IPNet) *http.Transport

SafeTransport blocks requests to private ip ranges

Types

type DialFunc added in v0.58.5

type DialFunc func(ctx context.Context, network, address string) (net.Conn, error)

func SafeDial added in v0.58.5

func SafeDial(dialer *net.Dialer, allowedBlocks ...*net.IPNet) DialFunc

SafeDial wraps a *net.Dialer and restricts connections to private ip ranges.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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