Browse Source

load allowedIPs from wireguard show wg0 dump in WireGuard service

pull/82/head
Vojta Drbohlav 4 years ago
parent
commit
103e0ff679
  1. 5
      src/lib/WireGuard.js

5
src/lib/WireGuard.js

@ -120,12 +120,12 @@ AllowedIPs = ${client.address}/32`;
publicKey: client.publicKey, publicKey: client.publicKey,
createdAt: new Date(client.createdAt), createdAt: new Date(client.createdAt),
updatedAt: new Date(client.updatedAt), updatedAt: new Date(client.updatedAt),
allowedIPs: client.allowedIPs,
persistentKeepalive: null, persistentKeepalive: null,
latestHandshakeAt: null, latestHandshakeAt: null,
transferRx: null, transferRx: null,
transferTx: null, transferTx: null,
allowedIPs: null,
})); }));
// Loop WireGuard status // Loop WireGuard status
@ -141,7 +141,7 @@ AllowedIPs = ${client.address}/32`;
publicKey, publicKey,
preSharedKey, // eslint-disable-line no-unused-vars preSharedKey, // eslint-disable-line no-unused-vars
endpoint, // eslint-disable-line no-unused-vars endpoint, // eslint-disable-line no-unused-vars
allowedIps, // eslint-disable-line no-unused-vars allowedIPs,
latestHandshakeAt, latestHandshakeAt,
transferRx, transferRx,
transferTx, transferTx,
@ -157,6 +157,7 @@ AllowedIPs = ${client.address}/32`;
client.transferRx = Number(transferRx); client.transferRx = Number(transferRx);
client.transferTx = Number(transferTx); client.transferTx = Number(transferTx);
client.persistentKeepalive = persistentKeepalive; client.persistentKeepalive = persistentKeepalive;
client.allowedIPs = allowedIPs;
}); });
return clients; return clients;

Loading…
Cancel
Save