vpn
共 4 个函数
函数索引
| 函数 | 参数 | 返回值 | 说明 |
|---|---|---|---|
| vpn.NewServer | - | *Server, error | |
| vpn.NewServerFromIdentity | encoded string | *Server, error | |
| vpn.PeerOf | c net.Conn | PeerInfo, bool | returns the authenticated VPN peer metadata for an accepted VPN connection. |
| vpn.SaveClientProfile | path string, profile string | error | writes private client credentials with owner-only |
函数详情
NewServer
NewServer() (*Server, error)
暂无描述
返回值
| 序号 | 类型 | 说明 |
|---|---|---|
| r1 | *Server | |
| r2 | error |
NewServerFromIdentity
NewServerFromIdentity(encoded string) (*Server, error)
暂无描述
参数
| 参数名 | 类型 | 说明 |
|---|---|---|
| encoded | string |
返回值
| 序号 | 类型 | 说明 |
|---|---|---|
| r1 | *Server | |
| r2 | error |
PeerOf
PeerOf(c net.Conn) (PeerInfo, bool)
returns the authenticated VPN peer metadata for an accepted VPN connection.
参数
| 参数名 | 类型 | 说明 |
|---|---|---|
| c | net.Conn |
返回值
| 序号 | 类型 | 说明 |
|---|---|---|
| r1 | PeerInfo | |
| r2 | bool |
SaveClientProfile
SaveClientProfile(path string, profile string) error
writes private client credentials with owner-only permissions. A partial write never replaces an existing profile.
参数
| 参数名 | 类型 | 说明 |
|---|---|---|
| path | string | |
| profile | string |
返回值
| 序号 | 类型 | 说明 |
|---|---|---|
| r1 | error |
