diff --git a/src/i18n/locales/en.json b/src/i18n/locales/en.json index 12fefc49..e78e6d99 100644 --- a/src/i18n/locales/en.json +++ b/src/i18n/locales/en.json @@ -96,7 +96,7 @@ "noPrivKey": "This client has no known private key. Cannot create Configuration.", "showQR": "Show QR Code", "downloadConfig": "Download Configuration", - "allowedIpsDesc": "Which IPs will be routed through the VPN", + "allowedIpsDesc": "Which IPs will be routed through the VPN (overrides global config)", "serverAllowedIpsDesc": "Which IPs the server will route to the client", "mtuDesc": "Sets the maximum transmission unit (packet size) for the VPN tunnel", "persistentKeepaliveDesc": "Sets the interval (in seconds) for keep-alive packets. 0 disables it", @@ -142,10 +142,10 @@ "connection": "Connection", "hostDesc": "Public hostname clients will connect to (invalidates config)", "portDesc": "Public UDP port clients will connect to (invalidates config)", - "allowedIpsDesc": "Allowed IPs clients will use (invalidates config)", + "allowedIpsDesc": "Allowed IPs clients will use (global config)", "dnsDesc": "DNS server clients will use (global config)", - "mtuDesc": "MTU clients will use (invalidates config)", - "persistentKeepaliveDesc": "Interval in seconds to send keepalives to the server. 0 = disabled (invalidates config)" + "mtuDesc": "MTU clients will use (only for new clients)", + "persistentKeepaliveDesc": "Interval in seconds to send keepalives to the server. 0 = disabled (only for new clients)" }, "interface": { "cidrSuccess": "Changed CIDR", diff --git a/src/server/utils/wgHelper.ts b/src/server/utils/wgHelper.ts index b2018de6..170a140f 100644 --- a/src/server/utils/wgHelper.ts +++ b/src/server/utils/wgHelper.ts @@ -65,7 +65,7 @@ ${hookLines.length ? `${hookLines.join('\n')}\n` : ''} [Peer] PublicKey = ${wgInterface.publicKey} PresharedKey = ${client.preSharedKey} -AllowedIPs = ${client.allowedIps.join(', ')} +AllowedIPs = ${(client.allowedIps ?? userConfig.defaultAllowedIps).join(', ')} PersistentKeepalive = ${client.persistentKeepalive} Endpoint = ${userConfig.host}:${userConfig.port}`; },