跳到主要内容

vpn

共 4 个函数

函数索引​

函数参数返回值说明
vpn.NewServer-*Server, error
vpn.NewServerFromIdentityencoded string*Server, error
vpn.PeerOfc net.ConnPeerInfo, boolreturns the authenticated VPN peer metadata for an accepted VPN connection.
vpn.SaveClientProfilepath string, profile stringerrorwrites private client credentials with owner-only

函数详情​

NewServer​

NewServer() (*Server, error)

暂无描述

返回值

序号类型说明
r1*Server
r2error

NewServerFromIdentity​

NewServerFromIdentity(encoded string) (*Server, error)

暂无描述

参数

参数名类型说明
encodedstring

返回值

序号类型说明
r1*Server
r2error

PeerOf​

PeerOf(c net.Conn) (PeerInfo, bool)

returns the authenticated VPN peer metadata for an accepted VPN connection.

参数

参数名类型说明
cnet.Conn

返回值

序号类型说明
r1PeerInfo
r2bool

SaveClientProfile​

SaveClientProfile(path string, profile string) error

writes private client credentials with owner-only permissions. A partial write never replaces an existing profile.

参数

参数名类型说明
pathstring
profilestring

返回值

序号类型说明
r1error