wireguard-client-wrapper
Version:
Crossplatform wrapper for wireguard client
17 lines (16 loc) • 633 B
TypeScript
export interface WgResponse {
stdout?: string;
stderr?: string;
}
export declare abstract class WgStrategy {
private processName;
constructor(processName: string);
protected exec(command: string, sudoPrompt?: boolean): Promise<WgResponse>;
abstract isInstalled(): Promise<boolean>;
abstract getActiveDevice(): Promise<string | null>;
abstract up(filePath: string): Promise<void>;
abstract down(filePath: string): Promise<void>;
abstract status(device: string): Promise<boolean>;
abstract generatePrivateKey(): Promise<string>;
abstract getPublicKey(config: string): Promise<string>;
}