Documentation
¶
Overview ¶
Package publicaddr decides which addresses relay may send a request to when the URL comes from a caller (a webhook receiver, a token endpoint): public unicast only, so a caller cannot reach loopback, private networks, link-local services such as a cloud metadata endpoint, or the relay host itself.
It decides on resolved IPs, never on hostnames: Refused checks one address, and DialControl checks the address a net.Dialer is about to connect to, after DNS. Redirects, proxies and URL syntax are the caller's concern.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrRefused = errors.New("address is not a public unicast address")
ErrRefused is the error for an address that is not public unicast.
Functions ¶
func DialControl ¶
DialControl is a net.Dialer Control function that refuses to connect to a refused address. address is the resolved "ip:port" the dialer is connecting to.
Types ¶
This section is empty.