Documentation
¶
Index ¶
- type MH
- func (h *MH) Add(domainsOrIps []string) int
- func (h *MH) Addrs() []netip.AddrPort
- func (h *MH) EqualAddrs(other *MH) bool
- func (h *MH) Len() int
- func (h *MH) Names() []string
- func (h *MH) PreferredAddr() netip.AddrPort
- func (h *MH) PreferredAddrs() []netip.AddrPort
- func (h *MH) Refresh() int
- func (h *MH) String() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MH ¶
type MH struct { sync.RWMutex // protects names and addrs // contains filtered or unexported fields }
MH is a list of hostnames and/or ip addresses for one endpoint.
func (*MH) Add ¶
Add appends the list of IPs, hostnames, and hostname's IPs as resolved. It returns the total number of IPs. Removes duplicates.
func (*MH) EqualAddrs ¶
func (*MH) PreferredAddr ¶
prefers v4; see: github.com/WireGuard/wireguard-android/blob/4ba87947a/tunnel/src/main/java/com/wireguard/config/InetEndpoint.java#L97
func (*MH) PreferredAddrs ¶
PreferredAddrs returns the list of IPs per the dialer's preference.
Click to show internal directories.
Click to hide internal directories.