WireGuard parity: alt_dns policy and teardown status #193
Loading…
Reference in a new issue
No description provided.
Delete branch "wg-parity"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
Two parity gaps in the WireGuard path, both found in the first live blip test (network change while connected to a ProtonVPN WG server):
wg()always applied the conf'sDNS =line and never consultedalt_dns, so every query went to the provider's resolver — which knows no local names. The user's own resolver, the reasonalt_dnsexists, never became primary. (The bug even blocked pushing this branch: with WG up, the forge's split-horizon name resolved to its public IP.)tunnel_terminatedstatus comes from its dying process's monitor thread. A WG teardown has no process, so the network-change teardown (#111) removed the link silently — tray and status page kept claiming a connection until autoconnect's ownkill()repainted.Fix
wg()follows the openvpn path's DNS policy:alt_dnsservers outrank the conf's,dns_offleaves DNS alone (same rulesdns_updown_disabled+alt_dns_pairencode for openvpn).tunnel_terminatedon the protocol branch ofdisconnect("main"). The openvpn branch stays silent — its process monitor already reports, and a second signal would be a duplicate. Gui-initiated disconnects tolerate the extra signal by design (tunnel_activeis already 0, same as a stale server-switch termination).Verification
TestWgDns(conf DNS by default, alt_dns outranks, dns_off silent),TestDisconnectMain(protocol teardown announces, openvpn teardown stays silent). Full suite 469 passed.