wireguard-tools
Version:
The best way to interact with WireGuard from Node
14 lines (13 loc) • 514 B
TypeScript
import { WgConfigObject } from '../types/WgConfigObject';
interface Options {
/** The full path to the file to write (use path.join to construct a full path before passing into this function) */
filePath: string;
/** The config to write either as a string or config object */
config: WgConfigObject | string;
}
/**
* A helper for writing a config file using fs.
* Checks that the dir exists and creates it if not
*/
export declare const writeConfig: (opts: Options) => Promise<void>;
export {};