Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( RootCaName = "root.pem" RootKeyName = "root.key" )
Functions ¶
func IsLocalAddr ¶
IsLocalAddr 判断addr(ip,域名等)是否指向本机 由于IP可能经由 iptable 指向,或者可能是域名,或者其它,不能直接与本机IP做对比 本方法构建一个临时的HTTP服务,然后使用指定的addr去连接改HTTP服务,如果能连接上,说明addr是指向本机的地址
func JoinHostPort ¶
JoinHostPort make IP:Port for ipv4/domain or [IPv6]:Port for ipv6.
func NewProxyDialer ¶
NewProxyDialer based on proxy url.
func PathExists ¶
Types ¶
type CertFiles ¶
func LoadCerts ¶
LoadCerts loads an existing certificate and key or creates new. CaRoot can be {dir}:{name}, like "" will default to .cert directory ":server" will find server.key and server.pem in .cert directory "." will default to xxx.key and xxx.pem in current directory ".:server" will find server.key and server.pem in . directory
type MkCert ¶
type StatConn ¶
StatConn statistics read and write bytes for net connection.
func NewStatConn ¶
func (StatConn) WriteBytes ¶
Click to show internal directories.
Click to hide internal directories.