Documentation
¶
Overview ¶
Package netutil provides common network utility functions used across the httpc library. It includes IP validation, localhost detection, and security-related network checks.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsLocalhost ¶
IsLocalhost detects localhost variations including: - "localhost" - 127.0.0.1 - ::1 - 0.0.0.0 - :: - 127.x.x.x range
func IsPrivateOrReservedIP ¶
IsPrivateOrReservedIP checks if an IP address is private, reserved, or otherwise not suitable for public internet communication. This is used for SSRF (Server-Side Request Forgery) protection.
func ValidateIP ¶
ValidateIP checks if an IP is allowed for outbound requests. Returns an error if the IP is blocked by security policy.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.