Help us shape the future of Go! Take the 2026 Go Developer Survey

network

package
v0.0.0-...-4c2942b Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package network owns endpoint authority policy and pinned public-address dialing.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Endpoint

func Endpoint(endpoint string, origins []string) (*url.URL, bool, error)

Endpoint validates a capability URL without changing its path or query, then reports whether its origin satisfies the selected policy. Policy errors never include the supplied URL. A nil origins slice selects curated providers.

func NewDialer

func NewDialer(timeout time.Duration) func(context.Context, string, string) (net.Conn, error)

NewDialer resolves and validates every connection's complete DNS answer and dials only numeric addresses. The HTTP transport retains the original URL hostname for TLS verification. Construction performs no DNS or network I/O.

func ValidateOrigins

func ValidateOrigins(origins []string) error

ValidateOrigins checks trusted overrides once. Origins have canonical lowercase authorities and no trailing slash so matching is unambiguous.

Types

This section is empty.

Jump to

Keyboard shortcuts

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