aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/assets/js
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2021-10-03 04:33:24 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2021-10-03 04:33:24 +0300
commit507877fe2e98149b403b41c1fed4b803571e0b34 (patch)
tree26a6dc8195025dc26fe4e7448242ff3238b67df2 /assets/js
parentmake code more copyable (diff)
downloadwireguard-config-507877fe2e98149b403b41c1fed4b803571e0b34.tar.gz
wireguard-config-507877fe2e98149b403b41c1fed4b803571e0b34.zip
expand about the manual method
Diffstat (limited to '')
-rw-r--r--assets/js/main.js11
1 files changed, 7 insertions, 4 deletions
diff --git a/assets/js/main.js b/assets/js/main.js
index 79e0dd2..56cde4d 100644
--- a/assets/js/main.js
+++ b/assets/js/main.js
@@ -362,11 +362,15 @@ allowed-ips=${data.client_ipv4.value.for_server()};${data.client_ipv6.value.for_
`);
}
+var shell_info =
+`# Make sure your .bash_history or whatever is
+# secure before running this.
+# Better yet, put into a file and run (possibly, using sudo).`;
+
function manual_client_script(data) {
return new Script(
`# On the client, run this to set up a connection.
-# Make sure your .bash_history or whatever is
-# secure before running this.
+${shell_info}
ip link add dev ${iface} type wireguard
ip addr add ${data.client_ipv4.value.for_client()} dev ${iface}
@@ -380,8 +384,7 @@ ip link set ${iface} up
function manual_server_script(data) {
return new Script(
`# On the server, run this to tweak an existing connection.
-# Make sure your .bash_history or whatever is
-# secure before running this.
+${shell_info}
wg set ${iface} peer ${data.client_public.value} preshared-key <( echo ${data.server_preshared.value} ) allowed-ips ${data.client_ipv4.value.for_server()},${data.client_ipv6.value.for_server()}
`);