Browse Source

Merge pull request #800 from minghongx/rm-newline-char

Remove redundant newline char in generated client configuration
pull/806/head
Peter Lewis 1 year ago
committed by GitHub
parent
commit
660d77d63b
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 7
      src/lib/WireGuard.js

7
src/lib/WireGuard.js

@ -196,12 +196,11 @@ 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 });
return ` return `[Interface]
[Interface]
PrivateKey = ${client.privateKey} PrivateKey = ${client.privateKey}
Address = ${client.address}/24 Address = ${client.address}/24
${WG_DEFAULT_DNS ? `DNS = ${WG_DEFAULT_DNS}` : ''} ${WG_DEFAULT_DNS ? `DNS = ${WG_DEFAULT_DNS}\n` : ''}\
${WG_MTU ? `MTU = ${WG_MTU}` : ''} ${WG_MTU ? `MTU = ${WG_MTU}\n` : ''}\
[Peer] [Peer]
PublicKey = ${config.server.publicKey} PublicKey = ${config.server.publicKey}

Loading…
Cancel
Save