Update debian/debian-secure.sh

This commit is contained in:
Minecon724 2025-08-06 22:25:39 +02:00
commit dbd8681baf

View file

@ -12,14 +12,14 @@ useradd -m -s /bin/bash $USERNAME
echo "Configuring WireGuard..." echo "Configuring WireGuard..."
if [ -z "$CLIENT_IP" ] || [ -z "$SERVER_IP" ] || [ -z "$PREFIXLEN" ]; then if [[ -z "$CLIENT_IP" ]] || [[ -z "$SERVER_IP" ]] || [[ -z "$PREFIXLEN" ]]; then
SUB_START="fc$(openssl rand -hex 1):$(openssl rand -hex 2):$(openssl rand -hex 2):$(openssl rand -hex 2)" SUB_START="fc$(openssl rand -hex 1):$(openssl rand -hex 2):$(openssl rand -hex 2):$(openssl rand -hex 2)"
CLIENT_IP="$SUB_START::2" CLIENT_IP="$SUB_START::2"
SERVER_IP="$SUB_START::1" SERVER_IP="$SUB_START::1"
PREFIXLEN=64 PREFIXLEN=64
fi fi
if [ "$CLIENT_IP" == *"."* ]; then if [[ "$CLIENT_IP" == *"."* ]]; then
HOST_MASK=32 HOST_MASK=32
else else
HOST_MASK=128 HOST_MASK=128