Is there a setting to toggle utilizing HTTP instead of HTTPS for APT?
Everything added in /etc/apt/sources.list and /etc/apt/sources.list.d/* are HTTPS and I would like them to be HTTP so the APT caching proxy I use (apt-cacher-ng) will cache them.
As it stands right now if I install software from the menu, repositories are added as HTTPS.
many thanks for your message. Simply change all source files in /etc/apt/sources.list and /etc/apt/sources.list.d/* to HTTP. There is no tool or global setting to do this.
This isn’t a solution when installing software through the dietpi-software menu because the scripts automatically overwrite any changes made.
For example, if I install something that adds the mono-xamarin.list file, it will be added as HTTPS and begin downloading, giving me no time to change the file.
If I install any other software that utilizes this repository, mono-xamarin.list will be overwritten attempting to install it.
dietpi-software will be replaced an each dietpi-update
Did you had a look to Debian Wiki? https://wiki.debian.org/AptCacherNg
Last point is talking about how to deal with https repositories and is providing a simple solution to tunnel HTTPS connections directly on the proxy
HTTPS can be utilized, but HTTP must be defined prior in the sources.list.
Caching objects
To cache packages and indexes retrieved via SSL/TLS repositories, we will have to configure apt-cacher-ng to remap a chosen non-https repository url to the actual https url.
Create a file named backends_packagecloud in /etc/apt-cacher-ng that looks like:
this might be an easier solution than adjusting dietpi-software every time you update DietPi scripts. Especially in combination with PassThroughPattern: ^(.*):443$ setting, your system will continue working even if a new source file was added. You would need to adjust mapping only in this case.
The clients still require sources.list to be in HTTP format (apt-cacher-ng cannot understand HTTPS,) so it will have to be modified every time dietpi-sofware updates.
Although, it will allow me to utilize HTTPS after HTTP traffic hits the apt-cacher-ng proxy.