ssrf

package
v0.2.11-alpha Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrSSRFBlocked = fmt.Errorf("SSRF blocked: URL resolves to private/internal IP")

Functions

func CheckRedirect

func CheckRedirect(req *http.Request, via []*http.Request) error

func CheckURL

func CheckURL(rawURL string) error

func IsPrivateIP

func IsPrivateIP(ip net.IP) bool

func NewSSRFSafeClient

func NewSSRFSafeClient(timeout time.Duration) *http.Client

func SetLookupIPForTest

func SetLookupIPForTest(fn func(string) ([]net.IP, error)) func()

func WrapTransportWithSSRFCheck

func WrapTransportWithSSRFCheck(transport *http.Transport) *http.Transport

Types

This section is empty.

Jump to

Keyboard shortcuts

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