Documentation
¶
Overview ¶
Package network provides network-related utilities for LocalGo
Index ¶
- func FormatAddress(ip net.IP, port int, https bool) string
- func GetInterfaceIPs(interfaceName string) ([]string, error)
- func GetLocalIP() (string, error)
- func GetLocalIPAddresses() ([]net.IP, error)
- func GetPreferredOutboundIP() (net.IP, error)
- func GetSubnetIPs(ip net.IP) []net.IP
- func ParseCIDRRange(cidr string) ([]net.IP, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatAddress ¶
FormatAddress formats an IP address and port into a URL
func GetInterfaceIPs ¶
GetInterfaceIPs returns all IP addresses for a specific network interface
func GetLocalIP ¶
GetLocalIP returns the primary non-loopback IP address of the machine
func GetLocalIPAddresses ¶
GetLocalIPAddresses returns a list of local IP addresses for all non-loopback interfaces
func GetPreferredOutboundIP ¶
GetPreferredOutboundIP gets the preferred IP address for outbound connections
func GetSubnetIPs ¶ added in v0.1.1
GetSubnetIPs returns all IP addresses in the same /24 subnet as the given IP
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.