Updates
Edit: Extended PoC of this idea is here. This is the blocking version (where non-networked TemplateVM will not translate curl/wget to curl-proxy/wget-proxy in the wrapper scripts.
Edit2: PoC code download here
Edit3: A non-blocking example for curl-wrapper automatically translates curl calls to curl-proxy calls under this post.
Edit4: No go. MOTD is a better approach. Proxy with static port is now considered risky by thread participants.
@deeplow @unman
I created issue Deploy curl-proxy/wget-proxy scripts so users can add GPG distro keys linked to added external repositories · Issue #7386 · QubesOS/qubes-issues · GitHub to propose a PoC that would permit users to manually call a curl-proxy script (which I think should be deployed in Qubes provided Templates by default), since it is currently impossible to download GPG keys from upstream package installation guides without the user having a clear understanding of all the commands implied, and where having such scripts (wget-proxy/curl-proxy) would permit users to benefit of the best way to maintain software packages under Qubes (which are: the best way to maintain OS related packages critical updates and normal package upgrade hygiene Qubes enforces by default).
As of now, the best way to install software under Qubes OS, shared between multiple qubes/proprietary softwares being seperated in a cloned specialized template, is still to install those additional software in the Templates themselves, where Qubes update widget will inform the user of available updates for those added reprositories as well, warning the user that updates are needed, and when applied, effective warnings are given to end users that they should restart their currently launched qubes to benefit from software upgrades that are now made available in templates. And where those warnings/GUI processed should receive maybe additional love.
The UX of installing new repositories under Qubes is limited by the capacity of users to be able to follow AND understand those upstream instructions without having to modify the installation guide given there, and the understanding of users of those commands and how to transform them into something that would work. Downloading gpg keys in disposable qubes, copying keys etc is too complicated for most of them.
curl-proxy
#!/bin/env bash
curl --proxy http://127.0.0.1:8082/ --tlsv1.2 --proto =https --max-time 180 "$@"
wget-proxy
#!/bin/env bash
https_proxy=http://127.0.0.1:8082/ http_proxy=http://127.0.0.1:8082/ wget --secure-protocol=TLSv1_2 --timeout=180 "$@"
Examples
Session-desktop documentation (https://deb.oxen.io/) drop in replacement:
sudo curl -so /etc/apt/trusted.gpg.d/oxen.gpg https://deb.oxen.io/pub.gpg
echo "deb https://deb.oxen.io $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/oxen.list
sudo apt update
sudo apt install session-desktop
Here the user would have to replace:
sudo curl -so /etc/apt/trusted.gpg.d/oxen.gpg https://deb.oxen.io/pub.gpg
to
sudo curl-proxy -so /etc/apt/trusted.gpg.d/oxen.gpg https://deb.oxen.io/pub.gpg
Signal-desktop instructions (Signal >> Download Signal for Linux) drop-in replacement:
Upstream instructions:
wget -O- https://updates.signal.org/desktop/apt/keys.asc | gpg --dearmor > signal-desktop-keyring.gpg
cat signal-desktop-keyring.gpg | sudo tee -a /usr/share/keyrings/signal-desktop-keyring.gpg > /dev/null
echo 'deb [arch=amd64 signed-by=/usr/share/keyrings/signal-desktop-keyring.gpg] https://updates.signal.org/desktop/apt xenial main' |\
sudo tee -a /etc/apt/sources.list.d/signal-xenial.list
sudo apt update && sudo apt install signal-desktop
Here the following line needs to be changed:
wget -O- https://updates.signal.org/desktop/apt/keys.asc | gpg --dearmor > signal-desktop-keyring.gpg
becomes
wget-proxy -O- https://updates.signal.org/desktop/apt/keys.asc | gpg --dearmor > signal-desktop-keyring.gpg
I think that this would be a direct drop-in replacements for most frequently deployed additional repositories (please advise here) and should be pushed as official Qubes OS guidelines to be typed for software installation.
The curl-proxy/wget-proxy scripts examples force TLSV1.2 as a safer default, so the end user could simply replace wget and curl commands found in installation guides when he tries to install additional software and initial additional repositories instructions.
I would welcome implementation discussions to happen under the issue, where this comment in this thread is more to understand reluctance in applying this direct solution instead of pushing the user to use alternatives (flatpak/snap/appimages) which updates mechanisms are unclear for the user (am I running updated version? no. Its going to be maybe updated in the background and I will not be notified of updates needed).