diff --git a/wireguard-install.sh b/wireguard-install.sh index 26e0614..150172b 100644 --- a/wireguard-install.sh +++ b/wireguard-install.sh @@ -87,12 +87,12 @@ function installQuestions() { read -rp "WireGuard interface name: " -e -i wg0 SERVER_WG_NIC done - until [[ "${SERVER_WG_IPV4}" =~ ^([0-9]{1,3}\.){3}1$ ]]; do - read -rp "Server's WireGuard IPv4 [x.x.x.1]: " -e -i 10.66.66.1 SERVER_WG_IPV4 + until [[ "${SERVER_WG_IPV4}" =~ ^([0-9]{1,3}\.){3} ]]; do + read -rp "Server's WireGuard IPv4: " -e -i 10.66.66.1 SERVER_WG_IPV4 done - until [[ "${SERVER_WG_IPV6}" =~ ^([a-f0-9]{1,4}:){3,4}:1$ ]]; do - read -rp "Server's WireGuard IPv6 [x:x:x::1]: " -e -i fd42:42:42::1 SERVER_WG_IPV6 + until [[ "${SERVER_WG_IPV6}" =~ ^([a-f0-9]{1,4}:){3,4}: ]]; do + read -rp "Server's WireGuard IPv6: " -e -i fd42:42:42::1 SERVER_WG_IPV6 done # Generate random number within private ports range