From f80eca7de9763deb9f936e5933f08adbeba55dc6 Mon Sep 17 00:00:00 2001 From: randomshell Date: Thu, 2 Jul 2020 15:59:03 +0000 Subject: [PATCH] Use $SERVER_WG_IPV4 and $SERVER_WG_IPV6 when suggesting the client IP --- wireguard-install.sh | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/wireguard-install.sh b/wireguard-install.sh index ac0ba2b..04826b3 100644 --- a/wireguard-install.sh +++ b/wireguard-install.sh @@ -27,11 +27,9 @@ function addClient() { exit 1 fi - CLIENT_WG_IPV4="10.66.66.2" - read -rp "Client's WireGuard IPv4 " -e -i "$CLIENT_WG_IPV4" CLIENT_WG_IPV4 + read -rp "Client's WireGuard IPv4 " -e -i "${SERVER_WG_IPV4: : -1}2" CLIENT_WG_IPV4 - CLIENT_WG_IPV6="fd42:42:42::2" - read -rp "Client's WireGuard IPv6 " -e -i "$CLIENT_WG_IPV6" CLIENT_WG_IPV6 + read -rp "Client's WireGuard IPv6 " -e -i "${SERVER_WG_IPV6: : -1}2" CLIENT_WG_IPV6 # Adguard DNS by default CLIENT_DNS_1="176.103.130.130"