forked from mirrors/amnezia-wg-easy
Revert "import & export configuration"
This commit is contained in:
parent
8b2706e3c2
commit
abdf96011e
7 changed files with 37 additions and 149 deletions
|
@ -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(() => { });
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue