Create peer pairs from more than one WgConfig object.
Will add wgConfigs[0] as a peer in wgConfigs[1] and wgConfigs[1] as a peer in wgConfigs[0] etc. Will fail and error if
Generate a string version of the WgConfig suitable for saving to a Wireguard Config file (wg0.conf)
Generate a key pair using wg optionally also generate a PreSharedKey
Get a wireguard config file as a parsed object
Get a wireguard config file as a string
Make sure a directory exists on the file system
make sure a file exists on the file system
Parse a WireGuard config file (wg0.conf) into a WgConfig object for use in Javascript-land If no valid interface is found in the config, it will throw an error If a peer in the peers array is invalid, it will throw an error
A helper for writing a config file using fs. Checks that the dir exists and creates it if not
Generated using TypeDoc
Checks that Wireguard is installed and available in path at 'wg' and returns the version string.
Will throw on Error if wg is not installed