netguard

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package netguard holds small, dependency-free network-address checks shared by anything that dials a URL it doesn't fully control the destination of — a model-chosen fetch, or a hostname-configured remote server whose DNS could be rebound after the admin approved it. Kept separate from any one caller's package so internal/agent (fetch_url) and internal/mcp (remote MCP servers) share one definition instead of two copies that could quietly drift apart.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsNonPublicIP

func IsNonPublicIP(ip net.IP) bool

IsNonPublicIP reports whether ip is loopback, link-local (this covers the 169.254.169.254 cloud-instance-metadata endpoint), private, multicast, or unspecified — the address ranges a connection to an untrusted or DNS-rebindable destination must never reach.

Types

This section is empty.

Jump to

Keyboard shortcuts

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