diff --git a/wireguard-install.sh b/wireguard-install.sh index 7ec9dd5..f1ed23e 100644 --- a/wireguard-install.sh +++ b/wireguard-install.sh @@ -203,11 +203,7 @@ function newClient() { # shellcheck disable=SC1091 source /etc/wireguard/params - if [[ $SERVER_PUB_IP =~ .*:.* ]]; then - ENDPOINT="[$SERVER_PUB_IP]:$SERVER_PORT" - else - ENDPOINT="$SERVER_PUB_IP:$SERVER_PORT" - fi + ENDPOINT="${SERVER_PUB_IP}:${SERVER_PORT}" printf "\n" until [[ "$CLIENT_WG_IPV4" =~ ^([0-9]{1,3}\.?){4}$ ]]; do