aboutsummaryrefslogtreecommitdiff
path: root/scripts/import-wireguard-configs.sh
Commit message (Collapse)AuthorAgeFilesLines
* fix(wireguard): bring the tunnel down before the rename modifyCraig Jennings3 days1-3/+5
| | | | | | `nmcli connection import` activates a full-tunnel (0.0.0.0/0) Proton profile immediately. The import loop renamed and set autoconnect off, then brought the tunnel down. Under `set -euo pipefail`, a failed modify aborted the script before that down ran, leaving a live full-tunnel VPN routing all traffic through Proton -- the exact unasked-for VPN the script exists to prevent. The next-run guard catches the leftover profile but not the still-active tunnel. Moved the down ahead of the modify. It targets the UUID, which is stable across the rename, so downing first is safe and no failure between import and modify can leave the tunnel up.
* fix(wireguard): deactivate imported configs so import never arms a tunnelCraig Jennings2026-07-051-4/+10
| | | | | | nmcli connection import both sets autoconnect yes and activates the profile immediately. The configs are full-tunnel (AllowedIPs 0.0.0.0/0), so a bare import brings the tunnel up and routes everything through it. Importing a file silently connected a VPN, leaving the machine exiting through Proton. Follow each import's autoconnect-off modify with a connection down, so importing only ever adds inactive profiles.
* feat(vpn): wireguard config import for the NM migrationCraig Jennings2026-07-021-0/+59
scripts/import-wireguard-configs.sh imports the seven Proton configs into NetworkManager with autoconnect forced off. Each config stages through a wgpvpn.conf temp copy (NM's import name must be a valid interface name; several config names exceed the 15-char limit) and is renamed by the UUID parsed from the import output, so a stray same-named connection can't be hit. A leftover wgpvpn connection — a run that died between import and rename, autoconnect still armed — makes the script refuse to run. 10 tests over a fake nmcli; velox migration verified (all seven wireguard, autoconnect no). The tunnels spec is implemented: all six phases shipped.