extnet

package
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 24, 2020 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsDomain

func IsDomain(host string) bool

IsDomain 是否是域名,只检查host或ip,不可带port,否则会误判

func IsIntranet

func IsIntranet(host string) bool

IsIntranet is intranet network,if host is domain,it will looks up host using the local resolver. net.LookupIP may cause deadlock in windows see https://github.com/golang/go/issues/24178 局域网IP段:

A类: 10.0.0.0~10.255.255.255
B类: 172.16.0.0~172.31.255.255
C类: 192.168.0.0~192.168.255.255

func SplitHostPort

func SplitHostPort(addr string) (string, uint16, error)

SplitHostPort splits a network address of the form "host:port", "host%zone:port", "[host]:port" or "[host%zone]:port" into host or host%zone and port.

A literal IPv6 address in hostport must be enclosed in square brackets, as in "[::1]:80", "[::1%lo0]:80".

See func Dial for a description of the hostport parameter, and host and port results.

Types

This section is empty.

Directories

Path Synopsis
connection
ccrypt
Package ccrypt 实现net.conn的加密conn接口 aes cfb加密码的连接,通过提供的配置使用pbkdf2生成key, 依靠key和hash生成iv
Package ccrypt 实现net.conn的加密conn接口 aes cfb加密码的连接,通过提供的配置使用pbkdf2生成key, 依靠key和hash生成iv
cflow
Package cflow 实现字节统计,读,写,读写统计,以字节为准.
Package cflow 实现字节统计,读,写,读写统计,以字节为准.
cgzip
Package cgzip 采用gzip压缩实现的net.conn接口
Package cgzip 采用gzip压缩实现的net.conn接口
ciol
Package ciol 实现 net.conn 网络io限速器接口
Package ciol 实现 net.conn 网络io限速器接口
csnappy
Package csnappy 采用snappy压缩实现的net.conn接口
Package csnappy 采用snappy压缩实现的net.conn接口

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL