Fixed newline bug

master
Cloud9 GF4 wgapi 2021-11-12 15:53:34 -07:00
parent f54eb79d0d
commit a8d6070adc
1 changed files with 3 additions and 2 deletions

View File

@ -104,11 +104,12 @@ PersistentKeepAlive = 25`)
const allowed_ips = ipv4_addr const allowed_ips = ipv4_addr
? `${ipv4_addr}/32, ${ipv6_addr}/128` ? `${ipv4_addr}/32, ${ipv6_addr}/128`
: `${ipv6_addr}/128` : `${ipv6_addr}/128`
const server_config = `\n const server_config = `
[Peer] # ${domain} [Peer] # ${domain}
PublicKey = ${keypair[0]} PublicKey = ${keypair[0]}
PresharedKey = ${psk} PresharedKey = ${psk}
AllowedIPs = ${allowed_ips}` AllowedIPs = ${allowed_ips}
`
// Add server_config to local wg0.conf // Add server_config to local wg0.conf
if (server.host===env.LOCAL_SERVER) { if (server.host===env.LOCAL_SERVER) {