Service should derive network info itself instead of relying on GUI registration #89
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?
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 inself.net/self.gw/self.gw_6on 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:
utils.default_interface()already exists service-side (used by theinterfaceproperty fallback)self.sys_bus.get_unix_user(sender)+ pwd, the wayimport_threadalready derives the caller's home directoryThen
bypass()shrinks to (at most) an explicit opt-in trigger, the registration dance disappears, and "no network info registered" becomes structurally impossible. The GUI-pushedroutesdict andnetwork_changere-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.pysignatures, and the GUI'snetwork_change/service_recovered.