aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2021-10-03 17:04:40 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2021-10-03 17:06:19 +0300
commit20647c6456ca5a43b5886c964fa25654915db34c (patch)
treee725dc055f99685bd34583d5c5deb5d113d59396
parentfix wg-quick imports on Android (diff)
downloadwireguard-config-20647c6456ca5a43b5886c964fa25654915db34c.tar.gz
wireguard-config-20647c6456ca5a43b5886c964fa25654915db34c.zip
manual: tweak output a bit
-rw-r--r--assets/js/main.js14
1 files changed, 11 insertions, 3 deletions
diff --git a/assets/js/main.js b/assets/js/main.js
index e17d7e3..4fe4957 100644
--- a/assets/js/main.js
+++ b/assets/js/main.js
@@ -414,8 +414,13 @@ ${shell_info}
ip link add dev ${iface} type wireguard
ip addr add ${data.client_ipv4.value.address()} dev ${iface}
ip addr add ${data.client_ipv6.value.address()} dev ${iface}
-wg set ${iface} private-key <( echo ${data.client_private.value} )
-wg set ${iface} peer ${data.server_public.value} preshared-key <( echo ${data.server_preshared.value} ) endpoint ${data.server_endpoint.value} allowed-ips ${data.client_ipv4.value.allowed_ips_client()},${data.client_ipv6.value.allowed_ips_client()}
+wg set ${iface} \\
+ private-key <( echo ${data.client_private.value} )
+wg set ${iface} \\
+ peer ${data.server_public.value} \\
+ preshared-key <( echo ${data.server_preshared.value} ) \\
+ endpoint ${data.server_endpoint.value} \\
+ allowed-ips ${data.client_ipv4.value.allowed_ips_client()},${data.client_ipv6.value.allowed_ips_client()}
ip link set ${iface} up
`);
}
@@ -425,7 +430,10 @@ function manual_server_script(data) {
`# On the server, run this to tweak an existing connection.
${shell_info}
-wg set ${iface} peer ${data.client_public.value} preshared-key <( echo ${data.server_preshared.value} ) allowed-ips ${data.client_ipv4.value.allowed_ips_server()},${data.client_ipv6.value.allowed_ips_server()}
+wg set ${iface} \\
+ peer ${data.client_public.value} \\
+ preshared-key <( echo ${data.server_preshared.value} ) \\
+ allowed-ips ${data.client_ipv4.value.allowed_ips_server()},${data.client_ipv6.value.allowed_ips_server()}
`);
}