fix(mullvad): Use --data-urlencode for Mullvad API key registration
Base64 WG pubkeys with + or / chars break plain -d POST. Hit this on VPS setup — "Invalid public key" from Mullvad API. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -95,8 +95,8 @@ cmd_setup() {
|
||||
# --- Step 2: Register with Mullvad API ---
|
||||
echo "Registering key with Mullvad..."
|
||||
RESULT=$(curl -s --max-time 15 -X POST https://api.mullvad.net/wg/ \
|
||||
-d "account=$ACCOUNT" \
|
||||
-d "pubkey=$PUBKEY")
|
||||
--data-urlencode "account=$ACCOUNT" \
|
||||
--data-urlencode "pubkey=$PUBKEY")
|
||||
|
||||
if echo "$RESULT" | grep -q "^[0-9]"; then
|
||||
MULLVAD_IPV4=$(echo "$RESULT" | cut -d',' -f1)
|
||||
|
||||
Reference in New Issue
Block a user