Service should derive network info itself instead of relying on GUI registration #89

Closed
opened 2026-08-20 11:36:51 -04:00 by mysticalsoap · 0 comments
Owner

bypass() makes the GUI the source of network facts the service could derive itself: the default interface, the gateway(s), and the user/group for cgroup ownership all arrive over the bus and live only in self.net/self.gw/self.gw_6 on the service instance. A service restart silently discards them, and every consumer then hits "no network info registered - skipping bypass rebuild" — the failure class behind the empty-table-11 bypass breakage (fixed symptomatically by the owner-watch resync in #84, but the state can still go stale between registration and use).

The service can derive all of it at the point of use instead:

  • default interface: utils.default_interface() already exists service-side (used by the interface property fallback)
  • gateways: the same netifaces/iproute lookup, one call away
  • user/group: self.sys_bus.get_unix_user(sender) + pwd, the way import_thread already derives the caller's home directory

Then bypass() shrinks to (at most) an explicit opt-in trigger, the registration dance disappears, and "no network info registered" becomes structurally impossible. The GUI-pushed routes dict and network_change re-registration logic go with it.

Related state-ownership cleanup to #24's single-source-of-truth direction; touches aqomui_service.py (bypass, cgroup_vpn), bypass.py signatures, and the GUI's network_change/service_recovered.

`bypass()` makes the GUI the source of network facts the service could derive itself: the default interface, the gateway(s), and the user/group for cgroup ownership all arrive over the bus and live only in `self.net`/`self.gw`/`self.gw_6` on the service instance. A service restart silently discards them, and every consumer then hits "no network info registered - skipping bypass rebuild" — the failure class behind the empty-table-11 bypass breakage (fixed symptomatically by the owner-watch resync in #84, but the state can still go stale between registration and use). The service can derive all of it at the point of use instead: - default interface: `utils.default_interface()` already exists service-side (used by the `interface` property fallback) - gateways: the same netifaces/iproute lookup, one call away - user/group: `self.sys_bus.get_unix_user(sender)` + pwd, the way `import_thread` already derives the caller's home directory Then `bypass()` shrinks to (at most) an explicit opt-in trigger, the registration dance disappears, and "no network info registered" becomes structurally impossible. The GUI-pushed `routes` dict and `network_change` re-registration logic go with it. Related state-ownership cleanup to #24's single-source-of-truth direction; touches `aqomui_service.py` (`bypass`, `cgroup_vpn`), `bypass.py` signatures, and the GUI's `network_change`/`service_recovered`.
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
mysticalsoap/aqomui#89
No description provided.