Skip to main content

target_of

Function target_of 

Source
pub fn target_of(host: &str) -> EgressTarget
Expand description

Classifies a host name or address for the egress doors.

The one authority for what this city counts as loopback and as the private network around it: the target kind decides whether the first public egress notice is due and whether an attachment to a person’s browser is on this machine at all. The host arrives already resolved to a name or an address; this function never resolves anything, and a host it cannot read as an address is public, which is the side that keeps the notice rather than the side that drops it.

Brackets around an IPv6 literal are stripped, so [::1] and ::1 are one address rather than two rules.