Revert "import & export configuration"

This commit is contained in:
Philip H 2024-07-10 12:44:59 +02:00 committed by GitHub
parent 8b2706e3c2
commit abdf96011e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 37 additions and 149 deletions

View file

@ -319,22 +319,6 @@ Endpoint = ${WG_HOST}:${WG_CONFIG_PORT}`;
await this.saveConfig();
}
async ___forceRestart() {
this.__configPromise = null;
await this.saveConfig();
}
async restoreConfiguration(config) {
const _config = JSON.parse(config);
await this.__saveConfig(_config);
await this.___forceRestart();
}
async backupConfiguration() {
const config = await this.getConfig();
return JSON.stringify(config, null, 2);
}
// Shutdown wireguard
async Shutdown() {
await Util.exec('wg-quick down wg0').catch(() => { });