Documentation ¶
Index ¶
- Constants
- func FromINI(r io.Reader) (configtypes.Config, error)
- func FromYAML(r io.Reader) (configtypes.Config, error)
- func MigrateToLatest(versionedConf configtypes.Config) (configtypes.Config, error)
- func StripINI(dst io.Writer, src io.Reader) error
- func ToINI(w io.Writer, versionedConf configtypes.Config) error
- func ToYAML(w io.Writer, versionedConf configtypes.Config) error
Constants ¶
View Source
const ( // DefaultListenPort is the default port to listen on. DefaultListenPort = 51820 // The default search domain to use for networks (if not specified). DefaultDomain = "my.nzzy.net." // Larger MTU's are susceptible to fragmentation on the public internet // (particularly when using IPv6). DefaultMTU = 1280 )
Variables ¶
This section is empty.
Functions ¶
func FromINI ¶ added in v0.16.0
func FromINI(r io.Reader) (configtypes.Config, error)
FromINI reads a WireGuard INI configuration from the given reader and returns the equivalent config object. This should only be used for importing existing configurations.
func FromYAML ¶
func FromYAML(r io.Reader) (configtypes.Config, error)
FromYAML reads the given reader and returns a config object.
func MigrateToLatest ¶ added in v0.27.0
func MigrateToLatest(versionedConf configtypes.Config) (configtypes.Config, error)
MigrateToLatest migrates the given config object to the latest version.
func StripINI ¶ added in v0.23.6
StripINI removes `wg-quick` specific configuration from the given INI file. This is analogous to the `wg-quick strip` command.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.