Documentation ¶
Overview ¶
Package netutil implements some network utility functions.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInvalidIPv4CIDR = errors.New("invalid IPv4 CIDR")
Functions ¶
func GetOutBoundIP ¶
GetOutBoundIP get preferred outbound ip of current process.
func SplitHostPort ¶ added in v1.3.0
SplitHostPort splits "host:port" or "[host]:port" into host and port without strict validation.
Types ¶
type IPv4Filter ¶ added in v1.0.0
type IPv4Filter struct {
// contains filtered or unexported fields
}
func NewIPv4Filter ¶ added in v1.0.0
func NewIPv4Filter() *IPv4Filter
Click to show internal directories.
Click to hide internal directories.