Remove the per-provider custom scripts feature #82

Closed
opened 2026-08-20 00:48:12 -04:00 by mysticalsoap · 1 comment
Owner

Remove the per-provider custom-scripts feature: the Scripts tab, save_scripts/clear_scripts/update_scripts_enabled in the GUI, exe_custom_scripts and its six call sites in tunnel.py, and the {provider}_scripts config keys.

Why:

  • It is arbitrary root command execution configured from the GUI: script strings live in config.json (written via cfgupdate) and run inside the root service's tunnel threads. polkit gates the writer, but it's a wide, quiet root-exec channel kept alive for a feature with no known users — same reasoning that deleted the self-updater (#19).
  • The hooks get no context (no device, no role, no env), so they can't do anything a tunnel hook is actually for.
  • They're keyed per provider but fire per tunnel process, which is how #74's sibling bug #81 exists (pre/down firing for hop connects). This removal supersedes #81 — the buggy guards exist only to gate this feature; the removal PR should close both.

If demand ever shows up, the re-add should be the inverse shape: hooks run in the GUI process as the user, triggered by the status/state signals the GUI already receives (it now holds the typed tunnel state for context) — no root involvement. Same check-only-re-add pattern as #48.

Remove the per-provider custom-scripts feature: the Scripts tab, `save_scripts`/`clear_scripts`/`update_scripts_enabled` in the GUI, `exe_custom_scripts` and its six call sites in `tunnel.py`, and the `{provider}_scripts` config keys. Why: - It is arbitrary root command execution configured from the GUI: script strings live in config.json (written via `cfgupdate`) and run inside the root service's tunnel threads. polkit gates the writer, but it's a wide, quiet root-exec channel kept alive for a feature with no known users — same reasoning that deleted the self-updater (#19). - The hooks get no context (no device, no role, no env), so they can't do anything a tunnel hook is actually for. - They're keyed per provider but fire per tunnel process, which is how #74's sibling bug #81 exists (pre/down firing for hop connects). This removal supersedes #81 — the buggy guards exist only to gate this feature; the removal PR should close both. If demand ever shows up, the re-add should be the inverse shape: hooks run in the GUI process as the user, triggered by the status/state signals the GUI already receives (it now holds the typed tunnel state for context) — no root involvement. Same check-only-re-add pattern as #48.
Author
Owner

Upstream history and ecosystem research before starting the removal — it strengthens the no-known-users rationale into an evidence-backed one:

  • The feature was author-driven, not requested. corrad1nho added it in e8ba225 (2018-11-24) in a same-day sprint alongside connection profiles; it shipped as one changelog line in 0.8.0 and was never documented in the README. No issue or PR in upstream's lifetime asked for it — every 'script' hit in that tracker is install/packaging or PIA-cert related, and the feature-request roundup from a month before (upstream #40) asked for a map, kill switch and server rotation, no hooks.
  • It shipped broken and nobody noticed. The initial implementation ran the wrong variable; the author fixed it himself six weeks later (upstream PR #61). That fix is the only maintenance the feature ever received, and no user ever filed a bug against it — for an arbitrary-root-exec feature, strong evidence of zero users.
  • Ecosystem check: serious implementations are either privilege-symmetric and file-based — OpenVPN --up/--down behind --script-security, wg-quick PostUp in a root-owned config, NetworkManager dispatcher.d (refuses scripts not owned by root or writable by group/world), Tunnelblick .tblk scripts behind admin-secured configs — or run hooks unprivileged as the user (Viscosity, Eddie), which is exactly the re-add shape this issue proposes. Direct precedent for the removal: NetworkManager deliberately ignores PostUp/PreDown when importing wg-quick configs (https://blogs.gnome.org/thaller/2019/03/15/wireguard-in-networkmanager/).
  • Adjacent channel found during the research and split out: imported OpenVPN configs can carry script directives into root execution — #197.
Upstream history and ecosystem research before starting the removal — it strengthens the no-known-users rationale into an evidence-backed one: - **The feature was author-driven, not requested.** corrad1nho added it in e8ba225 (2018-11-24) in a same-day sprint alongside connection profiles; it shipped as one changelog line in 0.8.0 and was never documented in the README. No issue or PR in upstream's lifetime asked for it — every 'script' hit in that tracker is install/packaging or PIA-cert related, and the feature-request roundup from a month before (upstream #40) asked for a map, kill switch and server rotation, no hooks. - **It shipped broken and nobody noticed.** The initial implementation ran the wrong variable; the author fixed it himself six weeks later (upstream PR #61). That fix is the only maintenance the feature ever received, and no user ever filed a bug against it — for an arbitrary-root-exec feature, strong evidence of zero users. - **Ecosystem check:** serious implementations are either privilege-symmetric and file-based — OpenVPN --up/--down behind --script-security, wg-quick PostUp in a root-owned config, NetworkManager dispatcher.d (refuses scripts not owned by root or writable by group/world), Tunnelblick .tblk scripts behind admin-secured configs — or run hooks unprivileged as the user (Viscosity, Eddie), which is exactly the re-add shape this issue proposes. Direct precedent for the removal: NetworkManager deliberately ignores PostUp/PreDown when importing wg-quick configs (https://blogs.gnome.org/thaller/2019/03/15/wireguard-in-networkmanager/). - Adjacent channel found during the research and split out: imported OpenVPN configs can carry script directives into root execution — #197.
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#82
No description provided.