forked from mirrors/amnezia-wg-easy
fix: reload configuration
* run linter * screenshot update
This commit is contained in:
parent
03b7d8e537
commit
e3ee09b755
5 changed files with 13 additions and 14 deletions
|
@ -111,7 +111,7 @@ PostDown = ${WG_POST_DOWN}
|
|||
[Peer]
|
||||
PublicKey = ${client.publicKey}
|
||||
${client.preSharedKey ? `PresharedKey = ${client.preSharedKey}\n` : ''
|
||||
}AllowedIPs = ${client.address}/32`;
|
||||
}AllowedIPs = ${client.address}/32`;
|
||||
}
|
||||
|
||||
debug('Config saving...');
|
||||
|
@ -206,7 +206,7 @@ ${WG_MTU ? `MTU = ${WG_MTU}\n` : ''}\
|
|||
[Peer]
|
||||
PublicKey = ${config.server.publicKey}
|
||||
${client.preSharedKey ? `PresharedKey = ${client.preSharedKey}\n` : ''
|
||||
}AllowedIPs = ${WG_ALLOWED_IPS}
|
||||
}AllowedIPs = ${WG_ALLOWED_IPS}
|
||||
PersistentKeepalive = ${WG_PERSISTENT_KEEPALIVE}
|
||||
Endpoint = ${WG_HOST}:${WG_CONFIG_PORT}`;
|
||||
}
|
||||
|
@ -322,7 +322,9 @@ Endpoint = ${WG_HOST}:${WG_CONFIG_PORT}`;
|
|||
async uploadConfiguration(config) {
|
||||
const _config = JSON.parse(config);
|
||||
await this.__saveConfig(_config);
|
||||
await this.__syncConfig();
|
||||
// force restart
|
||||
this.__configPromise = null;
|
||||
await this.saveConfig();
|
||||
}
|
||||
|
||||
async downloadConfiguration() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue