shaker/cacher
2022-07-08 15:18:04 +00:00
..
50_user.conf Moved cacher files to new subdirectory 2021-02-02 04:48:48 +00:00
acng.conf Salt - caching proxy - general tidy up 2022-05-15 14:36:33 +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 - add support for fedora and arch templates 2022-05-15 14:30:51 +00:00
clone.sls Salt - caching proxy - update to debian-11-minimal base. 2022-05-13 14:39:16 +00:00
clone.top Moved cacher files to new subdirectory 2021-02-02 04:48:48 +00:00
configure.sls Salt - caching proxy - general tidy up 2022-05-15 14:36:33 +00:00
configure.top Salt - caching proxy - general tidy up 2022-05-15 14:36:33 +00:00
create.sls Moved cacher files to new subdirectory 2021-02-02 04:48:48 +00:00
create.top Moved cacher files to new subdirectory 2021-02-02 04:48:48 +00:00
fedora_mirrors Salt - caching proxy - update fedora mirror list 2022-07-08 15:18:04 +00:00
install.sls Salt - caching proxy - general tidy up 2022-05-15 14:36:33 +00:00
install.top Moved cacher files to new subdirectory 2021-02-02 04:48:48 +00:00
README Salt - caching proxy - general tidy up 2022-05-15 14:36:33 +00:00
restore_templates.sls Salt - caching proxy - Restore repo definitions on package removal 2022-05-15 14:48:23 +00:00
restore_templates.top Salt - caching proxy - Restore repo definitions on package removal 2022-05-15 14:48:23 +00:00
use.sls Salt - caching proxy - general tidy up 2022-05-15 14:36:33 +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.  
Note that it expects a netvm called "tor" - you should change this to whatever netvm you want to use.  
Edit the netvm entry in create.sls

Config files are included, which will work out of the box for Debian,Ubuntu 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 be default.

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

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