Files

2.4 KiB

WireGuard configuration replacement verification

2026-10-13. No production configuration or keys changed and no service restart.

Verified

  • 12 native unit tests pass, including replacement validation, unchanged old configuration after invalid import, 0600 storage, secret-free import/status responses, and rejection while connected or before LAN mode is confirmed.
  • Root integration test runs two disposable Linux network namespaces with newly generated test-only keys. It imports a configuration, connects, changes to confirmed LAN mode, disconnects, rejects invalid configuration, imports fresh private/peer/PSK values, updates the synthetic peer and reconnects.
  • A fresh real WireGuard handshake after key replacement succeeds. IPv4 and IPv6 HTTP access through the new tunnel work. Host routes remain unchanged; both test namespaces and temporary key/configuration files are cleaned up.
  • Running Deck server.py, network-ui.js and network/config.py hashes match the reviewed repository versions. The UI file handler sends .conf content to the authenticated import API, which validates it before calling the native helper. Importing replaces the protected stored configuration atomically.
  • The production network service remains active with a recent handshake.

This is an actual isolated backend/network test and a deployed UI/API source comparison, not a click-through replacement of the user's real config.

User workflow

Keep a working LAN or SSH-admin path independent of the WireGuard peer being replaced. In Deck → Network, select LAN access, test it and confirm through that LAN access before disabling the old tunnel. Then choose the new .conf and import it (no deletion first is necessary), activate WireGuard and wait for a recent handshake. Set the desired tunnel/both access mode afterwards and confirm it through the new tunnel.

An active tunnel, unconfirmed mode change, or tunnel-only/both mode intentionally blocks import: the page cannot guarantee preserving a browser connection that depends on the peer being replaced. SSH remains the independent management channel. A remote user without direct LAN reachability can forward the host's LAN listener through their existing SSH connection; do not disable access checks or enable a public wildcard listener as a workaround.

Tests use synthetic peers only; no real keys, config dumps or raw production logs are committed. No rotation of the user's exposed keys occurred here.