fixup: `interface` is a reserved word in strict mode
This commit is contained in:
parent
8aafe6b8c9
commit
648594733c
|
@ -196,22 +196,18 @@ AllowedIPs = ${client.address}/32`;
|
||||||
const config = await this.getConfig();
|
const config = await this.getConfig();
|
||||||
const client = await this.getClient({ clientId });
|
const client = await this.getClient({ clientId });
|
||||||
|
|
||||||
const interface = `[Interface]
|
return `[Interface]
|
||||||
PrivateKey = ${client.privateKey}
|
PrivateKey = ${client.privateKey}
|
||||||
Address = ${client.address}/24
|
Address = ${client.address}/24
|
||||||
${WG_DEFAULT_DNS ? `DNS = ${WG_DEFAULT_DNS}\n` : ''}\
|
${WG_DEFAULT_DNS ? `DNS = ${WG_DEFAULT_DNS}\n` : ''}\
|
||||||
${WG_MTU ? `MTU = ${WG_MTU}\n` : ''}\
|
${WG_MTU ? `MTU = ${WG_MTU}\n` : ''}\
|
||||||
`;
|
|
||||||
|
|
||||||
const peer = `[Peer]
|
[Peer]
|
||||||
PublicKey = ${config.server.publicKey}
|
PublicKey = ${config.server.publicKey}
|
||||||
PresharedKey = ${client.preSharedKey}
|
PresharedKey = ${client.preSharedKey}
|
||||||
AllowedIPs = ${WG_ALLOWED_IPS}
|
AllowedIPs = ${WG_ALLOWED_IPS}
|
||||||
PersistentKeepalive = ${WG_PERSISTENT_KEEPALIVE}
|
PersistentKeepalive = ${WG_PERSISTENT_KEEPALIVE}
|
||||||
Endpoint = ${WG_HOST}:${WG_PORT}
|
Endpoint = ${WG_HOST}:${WG_PORT}`;
|
||||||
`;
|
|
||||||
|
|
||||||
return [interface, peer].join('\n');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async getClientQRCodeSVG({ clientId }) {
|
async getClientQRCodeSVG({ clientId }) {
|
||||||
|
|
Loading…
Reference in New Issue