Service should watch the network itself; network-change policy moves out of the GUI #111
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Successor to #89. That change made the service derive network facts at the point of use — but the network observer (
monitor.NetMon: operstate watching, gateway checks, change detection) still runs in the GUI process, and the reactions to a change live inaqomui_gui.network_change: kill tunnels, reconnect last server,save_default_dns, re-trigger the bypass. All policy, none of it UI.The gap this leaves: with the GUI closed, nobody watches the network. Unplug ethernet, switch Wi-Fi, resume from suspend — the service keeps dead tunnels, doesn't reconnect, doesn't rebuild the bypass, until a GUI process happens to start and its NetMon notices. Autoconnect-on-network-change is secretly a GUI feature.
Direction:
default_routes,default_interface,preferred_interface) folds into the service-side observer module at that point — observer and fact-reader are the same concern, which is why a standalonenetinfo.pywas considered and rejected (2026-08-20 discussion).network_change/service_recoveredon the GUI side shrink accordingly; #24's tunnel-state single-source-of-truth is the companion direction.Not 0.9.1 material; the provider-hookup release (0.9.2) is queued first.
Correction to the gap claim: "with the GUI closed, nobody watches the network" overstates it. Minimized-to-tray (the normal post-#107 close) keeps the GUI process — and NetMon, and network_change — fully alive; and tray-menu Quit tears tunnels down by design, leaving nothing to watch. The gap only exists when the GUI process is absent while tunnels are up: a GUI crash (service-owned tunnels survive, unwatched), tunnels driven via aqomui-cli/D-Bus with no GUI, or headless operation.
The case for the move is therefore architectural rather than a daily-use bug: network-reaction policy (kill/reconnect/bypass rebuild) is root-service business currently executed from an unprivileged UI process; CLI usage gets no reactions at all; a crash strands live tunnels; and #24/#89's single-source-of-truth direction wants transitions initiated where the state lives. Priority unchanged (0.9.2+), urgency downgraded.