fixup: `interface` is a reserved word in strict mode

This commit is contained in:
Minghong Xu 2024-01-31 03:45:07 +00:00
parent 8aafe6b8c9
commit 648594733c
1 changed files with 3 additions and 7 deletions

View File

@ -196,22 +196,18 @@ AllowedIPs = ${client.address}/32`;
const config = await this.getConfig();
const client = await this.getClient({ clientId });
const interface = `[Interface]
return `[Interface]
PrivateKey = ${client.privateKey}
Address = ${client.address}/24
${WG_DEFAULT_DNS ? `DNS = ${WG_DEFAULT_DNS}\n` : ''}\
${WG_MTU ? `MTU = ${WG_MTU}\n` : ''}\
`;
const peer = `[Peer]
[Peer]
PublicKey = ${config.server.publicKey}
PresharedKey = ${client.preSharedKey}
AllowedIPs = ${WG_ALLOWED_IPS}
PersistentKeepalive = ${WG_PERSISTENT_KEEPALIVE}
Endpoint = ${WG_HOST}:${WG_PORT}
`;
return [interface, peer].join('\n');
Endpoint = ${WG_HOST}:${WG_PORT}`;
}
async getClientQRCodeSVG({ clientId }) {