diff --git a/wireguard-install.sh b/wireguard-install.sh index f00f298..b775dc4 100644 --- a/wireguard-install.sh +++ b/wireguard-install.sh @@ -288,7 +288,8 @@ enter_custom_dns() { set_client_name() { # Allow a limited set of characters to avoid conflicts - client=$(sed 's/[^0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_-]/_/g' <<< "$unsanitized_client") + # Limit to 15 characters for compatibility with Linux clients + client=$(sed 's/[^0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_-]/_/g' <<< "$unsanitized_client" | cut -c-15) } enter_client_name() {