Documentation
¶
Index ¶
- func BuildInetSocketAddress(host string, port int) string
- func CheckPortOpen(host string, port int, timeout time.Duration) bool
- func CheckPortRangeOpen(host string, startPort int, endPort int, timeout time.Duration) []int
- func GetAllNetworkInterfaces() ([]net.Interface, error)
- func GetHostname() (string, error)
- func GetIPByHost(host string) (string, error)
- func GetLocalIP() (string, error)
- func GetMACAddress() (string, error)
- func GetPublicIP() (string, error)
- func HideIPPart(ip string) (string, error)
- func IPv4ToLong(ip string) (uint32, error)
- func IsInner(start uint32, end uint32, target uint32) bool
- func IsInnerIP(ip string) bool
- func IsUsableLocalPort(port int) bool
- func IsValidIP(ip string) bool
- func IsValidPort(port int) bool
- func LocalIPv4s() ([]string, error)
- func LongToIPv4(ipLong uint32) string
- func LookupMX(domain string) ([]*net.MX, error)
- func Ping(host string) (bool, error)
- func ResolveDomain(domain string) ([]string, error)
- func ToAbsoluteURL(baseURL string, relativeURL string) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildInetSocketAddress ¶
BuildInetSocketAddress builds InetSocketAddress
func CheckPortOpen ¶
CheckPortOpen checks if the specified host and port are open
func CheckPortRangeOpen ¶
CheckPortRangeOpen checks which ports are open in the specified host and port range
func GetAllNetworkInterfaces ¶
GetAllNetworkInterfaces gets information about all network interfaces
func GetLocalIP ¶
GetLocalIP gets the first non-loopback IP address of the local machine
func GetMACAddress ¶
GetMACAddress gets the first MAC address of the local machine
func HideIPPart ¶
HideIPPart hides the last part of an IP address and replaces it with *
func IPv4ToLong ¶
IPv4ToLong converts an IP address to a long value
func IsUsableLocalPort ¶
IsUsableLocalPort checks if a local port is usable
func LocalIPv4s ¶
LocalIPv4s gets a list of IP addresses of the local machine
func LongToIPv4 ¶
LongToIPv4 converts a long value to an IPv4 address
func ResolveDomain ¶
ResolveDomain resolves a domain name and returns the corresponding list of IP addresses
Types ¶
This section is empty.