privatehost

package
v0.136.0 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2026 License: Apache-2.0 Imports: 1 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package privatehost answers one question for the proxy-aware transports: can this hostname only mean something inside our own network?

An external egress proxy cannot resolve a Docker compose container name (go_foo-app-1, go-fleet-graph), a bare single-label name, or a reserved internal suffix. Sending one costs a request and a connection to the proxy provider and always ends in target_connect_resolve_failed, so these names go direct (and fail locally and cheaply when they do not resolve) whatever NO_PROXY says and whether or not the name resolves here right now.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Name

func Name(host string) bool

Name reports whether host is a DNS name that cannot be public: it has no dot (a single label, which includes every compose service and container name) or ends in a reserved internal suffix. IP literals are not names; callers classify those by address. An empty host is not private.

Types

This section is empty.

Jump to

Keyboard shortcuts

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