TODO: switch to offline mode automatically when the host OS goes offline (airplane mode)
pkgproxy has an offline mode (#54 (closed)) that is switched by a flag or over the admin socket. It should be able to follow the host's own idea of being offline, so a laptop in airplane mode or off any network keeps serving its cache at once instead of timing out against every upstream.
Ideas to evaluate, per platform:
- Linux: NetworkManager
Connectivity/StateChangedover D-Bus, systemd-networkd online state (networkctl,systemd-networkd-wait-onlinesemantics), rfkill. - macOS:
NWPathMonitor. Windows:INetworkListManagerconnectivity. - Opt-in flag; how it interacts with the explicit mode (
never|store-overloaded|offline, see #57 (closed)): an explicitofflinealways wins, host-offline should only force offline when the mode is notnever? (decide). - A captive portal or a link with no route to the upstream is not offline to the OS;
store-overloaded(circuit breaker) covers that case.
Edited by Zygmunt Krynicki