From 36d209397e6729faa06d2659bf3bd08f28e7505f Mon Sep 17 00:00:00 2001 From: randomshell Date: Thu, 2 Jul 2020 10:35:20 +0000 Subject: [PATCH] Use $SERVER_WG_IPV4 and $SERVER_WG_IPV6 when suggesting the client IP --- wireguard-install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wireguard-install.sh b/wireguard-install.sh index dfc8813..f916356 100644 --- a/wireguard-install.sh +++ b/wireguard-install.sh @@ -186,11 +186,11 @@ function newClient() { fi until [[ "$CLIENT_WG_IPV4" =~ ^([0-9]{1,3}\.?){4}$ ]]; do - read -rp "Client's WireGuard IPv4: " -e -i 10.66.66.2 CLIENT_WG_IPV4 + read -rp "Client's WireGuard IPv4: " -e -i "${SERVER_WG_IPV4: : -1}"2 CLIENT_WG_IPV4 done until [[ "$CLIENT_WG_IPV6" =~ ^([a-f0-9]{1,4}:?:?){3,5} ]]; do - read -rp "Client's WireGuard IPv6 : " -e -i fd42:42:42::2 CLIENT_WG_IPV6 + read -rp "Client's WireGuard IPv6 : " -e -i "${SERVER_WG_IPV6: : -1}"2 CLIENT_WG_IPV6 done # Adguard DNS by default