shaker/cacher
2024-02-12 23:28:11 +00:00
..
50_user.conf Moved cacher files to new subdirectory 2021-02-02 04:48:48 +00:00
acng.conf Salt - caching proxy - minor change in config file to allow UserPorts 2024-02-01 02:31:27 +00:00
archlx_mirrors Salt - caching proxy - add updated fedora and arch mirror lists 2022-05-15 14:32:19 +00:00
change_templates.sls Salt - caching proxy - handle rpmfusion repositories using baseurl instead of metalinks 2022-11-24 15:30:09 +00:00
change_templates.top Block Whonix templates from repository rewriting. 2022-08-22 10:25:54 +00:00
clone.sls Salt - caching proxy - rebase to Debian-12. 2024-02-01 00:40:03 +00:00
clone.top Moved cacher files to new subdirectory 2021-02-02 04:48:48 +00:00
config.sls Salt - caching proxy - allow updated package to update mirrors list and config file 2022-11-22 15:52:18 +00:00
configure.sls Salt - caching proxy - nftables for 4.2 2024-02-12 23:28:11 +00:00
configure.top Salt - caching proxy - general tidy up 2022-05-15 14:36:33 +00:00
create.sls Salt - caching proxy - make sure qubes-updates-proxy service is not loaded 2024-02-02 02:21:52 +00:00
create.top Moved cacher files to new subdirectory 2021-02-02 04:48:48 +00:00
fedora_mirrors Salt - caching proxy - rebase to Debian-12. 2024-02-01 00:40:03 +00:00
install.sls Salt - caching proxy - mask tinyproxy 2024-02-10 14:01:08 +00:00
install.top Moved cacher files to new subdirectory 2021-02-02 04:48:48 +00:00
mirrors.sls Salt - caching proxy - fix bug - mirrors called before acng install 2024-02-10 23:48:15 +00:00
pillar_init.sls Salt - caching proxy - use pillar to store identity 2023-02-21 12:54:22 +00:00
pillar_init.top Salt - caching proxy - use pillar to store identity 2023-02-21 12:54:22 +00:00
pillar.sls Salt - caching proxy - use pillar to store identity 2023-02-21 12:54:22 +00:00
README Salt - caching proxy -fix whitespace in baseurl definition. 2022-08-19 10:47:13 +00:00
restore_templates.sls Salt - caching proxy -fix whitespace in baseurl definition. 2022-08-19 10:47:13 +00:00
restore_templates.top Salt - caching proxy - Restore repo definitions on package removal 2022-05-15 14:48:23 +00:00
update.sls Salt - caching proxy - allow updated package to update mirrors list and config file 2022-11-22 15:52:18 +00:00
use.sls Salt - caching proxy - typo in use, updating proxy config 2024-02-01 01:46:47 +00:00
use.top Moved cacher files to new subdirectory 2021-02-02 04:48:48 +00:00

This is a caching proxy, based on apt-cacher-ng.  

Config files are included, which will work out of the box for Debian,Ubuntu,Arch, and Fedora.  
The cache and log directories are bind-mounted in /rw in the cacher qube.

Copy directory to /srv/salt, then run:  
qubesctl state.apply cacher.create
qubesctl --skip-dom0 --targets=template-cacher state.apply cacher.install  
qubesctl --skip-dom0 --targets=cacher state.apply cacher.configure

To automatically use the proxy run:  
qubesctl state.apply cacher.use  
This will configure /etc/qubes/policy.d/30-user.policy to use the caching proxy by default.

apt-cacher-ng will cache HTTPS requests if you change https:// to http://HTTPS/// in repo source lists.
To configure all templates to use the proxy in this way, run:  
qubesctl --skip-dom0 --templates state.apply cacher.change_templates  
Or target individual templates, as you wish:
qubesctl --skip-dom0 --targets=TEMPLATE1,TEMPLATE2  state.apply cacher.change_templates  


N.B
apt-cacher-ng works well for Debian,Ubuntu,and Arch.  
It works reasonably well for Fedora, but may require further tweaking of the apt-cacher-ng control file, and the fedora_mirrors lists.

To restore a template to the default state, a state is provided, restore_templates.sls.
Apply it like this:
qubesctl --skip-dom0 --targets=TEMPLATE1,TEMPLATE2  state.apply cacher.restore_templates  

The qrexec policy file at  /etc/qubes/policy.d/30-user.policy should be edited so that these templates use the default system proxy.