Get provider auto-update working, cleanly for ProtonVPN #157
Loading…
Reference in a new issue
No description provided.
Delete branch "auto-update-scheduler"
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
The 5-day provider auto-update has been dead since the fork: the gui's
update_checkhangs off acheck_updatesignal nothing emits (#142). And even if it fired, a ProtonVPN update re-feeds the stored auth file into the import — which since #146 holds the fetched OpenVPN pair, which cannot pass SRP — so it would die on the misleading "perhaps the credentials you entered are wrong" popup, with 2FA accounts unservable in any case (#147).Fix
*_lasttimestamps and config.json, and keeps working with no gui running: a QTimer checks 5 minutes after start (gated on the network being up) and every 6 hours, importing any provider ≥5 days stale. The sender-derived homedir the server list is delivered to is remembered inhomedirs.json; providers without one are skipped. The dead gui trigger chain (check_updatesignals,check_for_update,update_check+ queue) is removed.__getstate__dict, root-owned 0600 next to the certs) and no longer logs out on success (logout would revoke the stored tokens). A scheduled update resumes it viarefresh()and never attempts SRP — no password, no TOTP needed. A dead refresh token drops the stored session and fails with an honest sign-in-required message; a transient network failure leaves the session alone and reports as a network error.Verification
pytestgreen locally (357 passed), plus the CI ruff/compileall gates.TestAutoUpdateCheck(8 cases: due/fresh/off/no-network/no-homedir/no-auth-file/already-running/never-imported) andTestProtonSession(6 cases: persist+perms, renewal resume without SRP, missing/dead/transient-failure sessions, failed download leaves nothing).packaging/arch/build-branch-and-install.sh, then backdateProtonVPN_lastin/usr/share/aqomui/config.jsonand restart the service to watch a real renewal run.Closes #142, closes #147.
🤖 Generated with Claude Code
Live verification done (2026-08-24): after a manual re-import seeded the session (CAPTCHA solve, as expected for the first sign-in), a backdated
ProtonVPN_last+ service restart produced a scheduled renewal at the 5-minute mark — straight from "Last ProtonVPN update: 14 days ago - updating" to the server download with no SRP/CAPTCHA/2FA, 750 servers imported, session file re-saved root-owned 0600.The iptables WARNINGs visible during the run predate this branch: the per-import DNS-exception failed-deletes are #158 (dangling "-D" with no "-I" anywhere), and the cgroup batches are the bypass rebuild's usual delete-before-insert noise.
🤖 Generated with Claude Code