mirror of
https://github.com/w0rng/amnezia-wg-easy.git
synced 2025-04-27 22:00:24 +03:00
wip
This commit is contained in:
parent
18b6ce7c78
commit
9d355f67d8
12 changed files with 60 additions and 37 deletions
|
@ -34,8 +34,11 @@ module.exports = class WireGuard {
|
|||
},
|
||||
clients: {},
|
||||
};
|
||||
await this.saveConfig();
|
||||
}
|
||||
|
||||
await Util.exec('wg-quick up wg0');
|
||||
|
||||
return config;
|
||||
});
|
||||
}
|
||||
|
@ -99,7 +102,7 @@ AllowedIPs = ${client.address}/32`;
|
|||
const [
|
||||
publicKey,
|
||||
preSharedKey, // eslint-disable-line no-unused-vars
|
||||
endpoint,
|
||||
endpoint, // eslint-disable-line no-unused-vars
|
||||
allowedIps, // eslint-disable-line no-unused-vars
|
||||
latestHandshakeAt,
|
||||
transferRx,
|
||||
|
@ -110,9 +113,6 @@ AllowedIPs = ${client.address}/32`;
|
|||
const client = clients.find(client => client.publicKey === publicKey);
|
||||
if (!client) return;
|
||||
|
||||
client.endpoint = endpoint === '(none)'
|
||||
? null
|
||||
: endpoint;
|
||||
client.latestHandshakeAt = latestHandshakeAt === '0'
|
||||
? null
|
||||
: new Date(Number(`${latestHandshakeAt}000`));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue