I’m often using a metered connection (aka limited in volume) and Qubes OS trying to look for updates in each qube is not bandwidth friendly. Every fedora qube running requires ~80 MB of downloaded data only to check if there is an update for the template.
Is it possible to easily disable this auto check?
As the default update proxy is sys-net it makes it easy to look for a metered connection (the information is available with nmcli), I could make a systemd service that regularly look at the current connection and disable the update proxy accordingly, is it something that would be interesting to upstream?
I believe that we have to see the bigger picture. Instead of disabling the update proxy at individual qubes, we could cache those requests properly. This is what I am currently doing. My setup consists of an Nginx reverse/forward caching proxy. The update proxy URL is set to http://{archlinux|deb|yum|ftp}.qubes-os.home. Nginx seats between Internet and tinyproxy. And caches and forward requests to either https://{archlinux|deb|yum|ftp}.qubes-os.org or https://mirrors.kernel.org/{distro}. So all the forward requests are over secure HTTPS protocol (and .onion compatible). I wrote a front-end for it to individually invalidate/purge cache if I desire to do so. Here is a snapshot:
it would still look once in a while unfortunately, I do not want to waste any byte for checking updates. But having this out of the box in general would be awesome!
no, the plan was to disable it in sys-net (default update proxy for qubes, but not for dom0 )
Qubes don’t use the update proxy to check for updates, they are checking the updates from the inside using their network connection provided by their net qube.
I guess the only way would be to check the metered status in sys-net and then notify the dom0 about it using qrexec so that dom0 can disable or enable the qubes-update-check service for all qubes.
It is definitely doable. upgrades-installed-check could query an special metered-connection feature from dom0. And exit before doing its work if the connection is metered.
p.s.: How do you check if the connection is metered? Based on IP range, Connection name? Or is there some new IETF standard for it to let internet providers announce it? I am curious.
Oh. I see that nmcli has special property for it. Sorry for my negligence.
Very nice. The only remaining problem is that it is not a good idea to set a global metered-connection feature for dom0. Since user might have multiple NetVMs with different upstream network interfaces and only one would be metered. Setting metered-connection feature per NetVM is doable. However a mechanism should be developed for the VMs that connect through that NetVM to inherit that feature. Finally they could query their own metered-connection
I think instead of patching upgrades-installed-check it’d be better to override qubes-update-check systemd service in the templates and add the metered condition check:
I just found about DHCP Option 43 (Vendor specific options) with the value ANDROID_METERED. Which could announce a metered connection via DHCP. Sadly we do not have DHCP here. Otherwise all of this could have been done through the connection rather than Qubes features.
No, it’s not a complete solution, just remark on how it’d be better to disable the updates check if there is already information about metered connection being used in the qube.
The question on how it’d be better to get the metered connection status from sys-net to other qubes is still open.
Would it make sense to have a metered VPN? For now, I only see metered connections be a thing for physical network interfaces, I don’t think this should apply on netvm that already have a netvm, what do you think?
I could imagine some corporate LAN without internet access by default and access to the internet metered connection over VPN running on the server with e.g. GSM modem in this LAN.
But it’s a rare case.
Qubes Global Config → Updates → Disable checking for updates for all existing qubes
This simple option has been in Qubes for many years. (Even before Qubes Global Config, it was available elsewhere.) I’m a bit puzzled as to why some of the previous replies in this thread make it seem much harder than it is.