gluetun-pia: CA-pinned regen + CA-aware region auto-pick (fix legacy-CN break)

Replaces the Go pia-wg-config (Go 1.23 rejects PIA legacy-CN no-SAN certs) with
PIA's official CA-pinned curl flow. Adds CA-aware region auto-pick so ExpressVPN-CA
migrated regions (e.g. us_chicago) auto-skip; region moved to us_denver. Tunnel
restored + egress verified 2026-06-30.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
tommy
2026-06-30 22:01:16 -05:00
parent 6af09ef9c6
commit 0f3973023a
5 changed files with 196 additions and 0 deletions
+13
View File
@@ -0,0 +1,13 @@
#!/usr/bin/env bash
set -euo pipefail
# Self-heal recovery for a stale/dead PIA WireGuard tunnel — the one-line action to run
# when the VpnTunnelDown alert fires. Registers a fresh peer, then recreates gluetun so
# it loads the new wg0.conf, and reconnects SAB/Transmission through the restored netns.
cd "$(dirname "$0")/.." # -> ~/downloads
echo "[regen-and-up] 1/3 registering a fresh PIA WG peer..."
docker compose run --rm pia-wg-regen
echo "[regen-and-up] 2/3 recreating gluetun with the new wg0.conf..."
docker compose up -d --force-recreate --no-deps gluetun
echo "[regen-and-up] 3/3 reconnecting dependents through the restored netns..."
docker compose up -d --force-recreate sabnzbd transmission
echo "[regen-and-up] done."