aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/assets/js
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--assets/js/main.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/assets/js/main.js b/assets/js/main.js
index 21b5d62..8a6555d 100644
--- a/assets/js/main.js
+++ b/assets/js/main.js
@@ -901,10 +901,14 @@ function manual_client_script(data) {
var path = 'client_setup.sh';
var allowed_ips = `${data.client_ipv4.allowed_ips_client()},${data.client_ipv6.allowed_ips_client()}`;
+ var keepalive = '';
if (data.tunnel_everything.value) {
allowed_ips = `${catchall_ipv4},${catchall_ipv6}`;
}
+ if (data.keepalive.is_set()) {
+ keepalive = ` persistent-keepalive ${data.keepalive.value} \\\n`;
+ }
var contents =
`# On the client, run this to set up a connection.
@@ -918,7 +922,7 @@ wg set ${iface} \\
wg set ${iface} \\
peer ${data.server_public.value} \\
preshared-key <( echo ${data.preshared.value} ) \\
- endpoint ${data.server_endpoint.value} \\
+${keepalive} endpoint ${data.server_endpoint.value} \\
allowed-ips ${allowed_ips}
ip link set ${iface} up
`;