Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RenderClientConfig ¶
func RenderClientConfig(renderContext TemplateContext) ([]byte, error)
func TunnelNameIsValid ¶
TunnelNameIsValid is copied from wireguard windows client because windows put a series of restrictions on tunnel names.
Types ¶
type ClientConfig ¶
type ClientConfig struct { IF int `json:"if"` // interface 0=wg0 1=wg1... NoDNS bool `json:"no_dns"` // comment out the DNS = line RouteDNS bool `json:"route_dns"` // Append the DNS servers to AllowedIPs line }
ClientConfig .
type ClientConfigs ¶
type ClientConfigs []ClientConfig
type Config ¶
type Config struct { Users Users AllowedIPs []string DNSNames []string DNS []string ServerPublicKey string Interfaces Interfaces }
func ReadConfig ¶
func (Config) AllClientConfigs ¶
func (c Config) AllClientConfigs() ClientConfigs
func (*Config) UpdateAllowedIPs ¶
type Interfaces ¶
type TemplateContext ¶
type TemplateContext struct { PrivateKey string PeerPublicKey string PeerEndpoint string NetPrefix string NetSuffix string DNS string AllowedIPS string }
TemplateContext is a template for rending a single end user client config file.
Click to show internal directories.
Click to hide internal directories.