Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DestroyConfig ¶
func DestroyConfig(ifaceName string)
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewWireguardClient ¶
NewWireguardClient creates new wireguard kernel space client.
func NewWireguardEndpoint ¶
func (*Client) ConfigureDevice ¶
func (c *Client) ConfigureDevice(config DeviceConfig) error
func (*Client) DestroyDevice ¶
func (*Client) ReConfigureDevice ¶
func (c *Client) ReConfigureDevice(config DeviceConfig) error
type DeviceConfig ¶
type DeviceConfig struct { IfaceName string `json:"iface_name"` Subnet net.IPNet `json:"subnet"` PrivateKey string `json:"private_key"` ListenPort int `json:"listen_port"` DNSPort int `json:"dns_port,omitempty"` DNS []string `json:"dns"` // Used only for unix. DNSScriptDir string `json:"dns_script_dir"` Peer Peer `json:"peer"` ReplacePeers bool `json:"replace_peers,omitempty"` ProxyPort int `json:"proxy_port,omitempty"` }
DeviceConfig describes wireguard device configuration.
func ConfigFactory ¶
func ConfigFactory() (*DeviceConfig, error)
Click to show internal directories.
Click to hide internal directories.