Browse Source

WireGuard.js: patch ipv6 address

pull/781/head
Philip H 2 years ago
committed by GitHub
parent
commit
9741c98bfc
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 4
      src/lib/WireGuard.js

4
src/lib/WireGuard.js

@ -119,7 +119,7 @@ PostDown = ${WG_POST_DOWN}
[Peer] [Peer]
PublicKey = ${client.publicKey} PublicKey = ${client.publicKey}
${client.preSharedKey ? `PresharedKey = ${client.preSharedKey}\n` : '' ${client.preSharedKey ? `PresharedKey = ${client.preSharedKey}\n` : ''
}AllowedIPs = ${client.address}/32`; }AllowedIPs = ${client.address}/32, ${client.address6}/128`;
} }
debug('Config saving...'); debug('Config saving...');
@ -210,7 +210,7 @@ ${client.preSharedKey ? `PresharedKey = ${client.preSharedKey}\n` : ''
return ` return `
[Interface] [Interface]
PrivateKey = ${client.privateKey ? `${client.privateKey}` : 'REPLACE_ME'} PrivateKey = ${client.privateKey ? `${client.privateKey}` : 'REPLACE_ME'}
Address = ${client.address}/24 Address = ${client.address}/24, ${client.address6}/64
${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` : ''}\

Loading…
Cancel
Save