Documentation ¶
Index ¶
- Variables
- func ResetDNSCache()
- type ApiInterfacePrivateKey
- type ApiListenPort
- type ApiPeerAllowedIPs
- type ApiPeerEndpoint
- type ApiPeerPersistentKeepalive
- type ApiPeerPreSharedKey
- type ApiPeerPublicKey
- type ApiReplacePeers
- type ClientConfig
- type Configable
- type Connection
- type IPv4
- func (ipv4 *IPv4) MarshalJSON() ([]byte, error)
- func (ipv4 *IPv4) Put(dst []byte)
- func (ipv4 *IPv4) Set(src []byte)
- func (ipv4 *IPv4) String() string
- func (ipv4 *IPv4) UnmarshalBinary(data []byte) error
- func (ipv4 *IPv4) UnmarshalJSON(data []byte) error
- func (ipv4 *IPv4) UnmarshalText(data []byte) error
- type IpcKeyValue
- type IpcRequest
- type Key
- type Port
- type ServerConfig
- type ServerPeer
- type ServerPeers
- type Transfer
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInvalidPeerFlag = errors.New("not a valid peer flag value")
Functions ¶
func ResetDNSCache ¶
func ResetDNSCache()
Types ¶
type ApiInterfacePrivateKey ¶
type ApiInterfacePrivateKey Key
func (ApiInterfacePrivateKey) GetKey ¶
func (ApiInterfacePrivateKey) GetKey() string
func (ApiInterfacePrivateKey) GetValue ¶
func (k ApiInterfacePrivateKey) GetValue() string
type ApiListenPort ¶
type ApiListenPort uint16
func (ApiListenPort) GetKey ¶
func (ApiListenPort) GetKey() string
func (ApiListenPort) GetValue ¶
func (p ApiListenPort) GetValue() string
type ApiPeerAllowedIPs ¶
type ApiPeerAllowedIPs string
func (ApiPeerAllowedIPs) GetKey ¶
func (ApiPeerAllowedIPs) GetKey() string
func (ApiPeerAllowedIPs) GetValue ¶
func (k ApiPeerAllowedIPs) GetValue() string
type ApiPeerEndpoint ¶
func (ApiPeerEndpoint) GetKey ¶
func (ApiPeerEndpoint) GetKey() string
func (ApiPeerEndpoint) GetValue ¶
func (e ApiPeerEndpoint) GetValue() string
func (*ApiPeerEndpoint) String ¶
func (e *ApiPeerEndpoint) String() string
func (*ApiPeerEndpoint) UnmarshalText ¶
func (e *ApiPeerEndpoint) UnmarshalText(text []byte) error
type ApiPeerPersistentKeepalive ¶
type ApiPeerPersistentKeepalive uint
func (ApiPeerPersistentKeepalive) GetKey ¶
func (ApiPeerPersistentKeepalive) GetKey() string
func (ApiPeerPersistentKeepalive) GetValue ¶
func (p ApiPeerPersistentKeepalive) GetValue() string
type ApiPeerPreSharedKey ¶
type ApiPeerPreSharedKey Key
func (ApiPeerPreSharedKey) GetKey ¶
func (ApiPeerPreSharedKey) GetKey() string
func (ApiPeerPreSharedKey) GetValue ¶
func (k ApiPeerPreSharedKey) GetValue() string
type ApiPeerPublicKey ¶
type ApiPeerPublicKey Key
func (ApiPeerPublicKey) GetKey ¶
func (ApiPeerPublicKey) GetKey() string
func (ApiPeerPublicKey) GetValue ¶
func (k ApiPeerPublicKey) GetValue() string
type ApiReplacePeers ¶
type ApiReplacePeers bool
func (ApiReplacePeers) GetKey ¶
func (ApiReplacePeers) GetKey() string
func (ApiReplacePeers) GetValue ¶
func (k ApiReplacePeers) GetValue() string
type ClientConfig ¶
type ClientConfig struct { Private Key Public Key Endpoint ApiPeerEndpoint PersistentKeepalive uint32 AllowedIPs string }
func (*ClientConfig) WGConfig ¶
func (cfg *ClientConfig) WGConfig() string
type Configable ¶
type Configable interface{ WGConfig() string }
type Connection ¶
type Connection struct {
// contains filtered or unexported fields
}
func NewConnection ¶
func NewConnection(tunnel tun.Device, cfg Configable) (*Connection, error)
func (*Connection) Close ¶
func (c *Connection) Close() error
func (*Connection) Down ¶
func (c *Connection) Down() error
func (*Connection) SetConfig ¶
func (c *Connection) SetConfig(cfg Configable) error
func (*Connection) Transfer ¶
func (c *Connection) Transfer() (*Transfer, error)
func (*Connection) Up ¶
func (c *Connection) Up() error
type IPv4 ¶
type IPv4 [4]byte
func (*IPv4) MarshalJSON ¶
func (*IPv4) UnmarshalBinary ¶
func (*IPv4) UnmarshalJSON ¶
func (*IPv4) UnmarshalText ¶
type IpcKeyValue ¶
type IpcRequest ¶
type IpcRequest []IpcKeyValue
func (IpcRequest) WGConfig ¶
func (ir IpcRequest) WGConfig() string
type ServerConfig ¶
type ServerConfig struct { Private Key Address IPv4 Peer ServerPeers ListenPort uint16 }
func (*ServerConfig) WGConfig ¶
func (cfg *ServerConfig) WGConfig() string
type ServerPeer ¶
func (*ServerPeer) PeerElems ¶
func (*ServerPeer) PeerElems() int
type ServerPeers ¶
type ServerPeers []*ServerPeer
Click to show internal directories.
Click to hide internal directories.