netguard

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2026 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Overview

Package netguard provides SSRF-safe outbound HTTP helpers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Client

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

Client returns an http.Client with timeout and redirect blocking to private nets.

func Get

func Get(ctx context.Context, rawURL string, maxBody int64) ([]byte, error)

Get performs a bounded GET after SSRF validation.

func ValidateFetchURL

func ValidateFetchURL(raw string) error

ValidateFetchURL ensures url is an https URL whose host does not resolve to private/link-local/metadata addresses.

Types

This section is empty.

Jump to

Keyboard shortcuts

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