e5d59fd94d
linuxserver/wireguard auto-generates its own PrivateKey on first container start, independently of the PIC API's key-store. When the two diverge, the API generates peer configs with the wrong server public key and the WireGuard handshake fails silently — the client can ping the VPN subnet (10.0.0.x) but gets no internet and cannot reach any Docker service (172.20.0.x). Adds _sync_keys_from_conf(): called at the top of apply_config(), reads the PrivateKey from wg0.conf, derives the matching public key, and overwrites the API key files (private.key / public.key) if they differ. This makes wg0.conf the authoritative source for the server identity, keeping get_peer_config() consistent with the live WireGuard interface. Adds 5 new tests in TestSyncKeysFromConf covering: - key-store update when conf key differs - no-op when keys already match - get_peer_config() uses the synced key - no raise when conf is missing - apply_config() passes the synced key through bootstrap Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>