Remove WG_CONFIG_MAX_AGE environment variable and update README to reflect changes in WireGuard configuration handling. Refactor rotation logic in rotate.py to always generate a new keypair and simplify state management.
Build and Push Docker Images / build-and-push (push) Successful in 20s

This commit is contained in:
2026-08-14 21:19:35 +02:00
parent bc9d79de02
commit 6952789722
3 changed files with 5 additions and 95 deletions
@@ -49,8 +49,6 @@ docker run --rm --entrypoint /opt/venv/bin/python \
| `TOKEN_CACHE_PATH` | `/config/cache/pia-token.json` | Disk-cache voor PIA auth-token |
| `TOKEN_CACHE_TTL` | `20h` | Hergebruik token i.p.v. opnieuw inloggen |
| `PIA_CA_PATH` | `/config/cache/ca.rsa.4096.crt` | Gecachete PIA CA voor `addKey` TLS |
| `WG_CONFIG_MAX_AGE` | `7d` | Geen nieuwe token/`addKey` zolang endpoint gelijk blijft en config jonger is |
| `FORCE_ROTATE` | `false` | `true` = altijd nieuwe config + restarts |
| `FORCE_TOKEN_REFRESH` | `false` | `true` = token-cache negeren |
| `RATE_LIMIT_WAIT_SECONDS` | `3600` | Wachttijd bij PIA rate-limit vóór retry |
| `TZ` | `Europe/Brussels` | Tijdzone voor scheduling |
@@ -113,8 +111,8 @@ Behoud minimaal:
1. Latency meten over WG-servers in `PIA_REGIONS` (of random)
2. **Pin** de snelste server-IP (niet alleen regio)
3. Keypair lokaal genereren; token + `addKey` alleen bij echte refresh
4. Caches: serverlist, token (~20u), CA-cert
5. Skip token/`addKey`/restarts als endpoint gelijk blijft én config jonger dan `WG_CONFIG_MAX_AGE`
3. Altijd nieuw keypair + `addKey` (reauth), daarna containers herstarten
4. Caches: serverlist, token (~20u), CA-cert — alleen om overbodige API-calls te beperken
5. Bij rate-limit: `RATE_LIMIT_WAIT_SECONDS` (default 1 uur) wachten en opnieuw proberen
**Let op:** zet gluetun **niet** in `RESTART_CONTAINERS`; gebruik `GLUETUN_CONTAINER`. Elke echte rotatie geeft korte downtime.