2021-02-10 01:53:23 -05: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.
|
2019-08-05 07:18:03 -04:00
|
|
|
Edit the netvm entry in create.sls
|
|
|
|
|
2021-02-10 01:53:23 -05:00
|
|
|
Config files are included, which will work out of the box for Debian,Ubuntu and Fedora.
|
2019-08-05 07:18:03 -04:00
|
|
|
The cache and log directories are bind-mounted in /rw in the cacher qube.
|
|
|
|
|
2021-02-10 01:53:23 -05:00
|
|
|
Copy directory to /srv/salt, then run:
|
|
|
|
qubesctl state.apply cacher.create.
|
|
|
|
qubesctl --skip-dom0 --targets=template-cacher state.apply cacher.install
|
2019-08-05 07:18:03 -04:00
|
|
|
qubesctl --skip-dom0 --targets=cacher state.apply cacher.configure
|
|
|
|
|
2021-02-10 01:53:23 -05:00
|
|
|
To automatically use the proxy run:
|
|
|
|
qubesctl state.apply cacher.use
|
|
|
|
This will configure /etc/qubes-rpc/policy/qubes.UpdatesProxy to use the cachingproxy be default.
|
|
|
|
|
|
|
|
apt-cacher-ng will cache HTTPS requests if you change https:// to http://HTTPS/// in repo source lists.
|
2021-10-07 10:48:30 -04:00
|
|
|
To configure the templates to use the proxy in this way, run:
|
2021-02-10 01:53:23 -05:00
|
|
|
qubesctl --skip-dom0 --targets=Templates state.apply cacher.change_templates.sls
|
|
|
|
Or target individual templates, as you wish.
|
2019-08-05 07:18:03 -04:00
|
|
|
|
2021-02-10 01:53:23 -05:00
|
|
|
N.B
|
|
|
|
apt-cacher-ng works well for Debian,Ubuntu,and Arch.
|
2021-10-07 10:48:30 -04:00
|
|
|
It works reasonably well for Fedora, but may require tweaking of the apt-cacher-ng control file, and the fedora_mirrors lists.
|