Jump to content

[Armbian build PR] - RFC: https_proxy extension: initial commit


Recommended Posts

Posted

Description

This is a draft/wip for adding https proxy caching. This is especially designed for machines hosting lots of github runners to reduce their bandwidth usage by sacrificing disk space. http caching has been merged already and only needed minor changes.

Caching https however is way more complicated. Encryption needs to be broken and rewrapped and then obviously downloads will fail due to cert issues. Classic MITM. So a new certificate authority (CA) needs to be put in place to allow these "fake" certs.

Why is this even necessary? Well one major part is downloads from upstream apt repositories. The other major part is downloading 3rd party repositories and artifacts from OCI/ORAS/whatever the correct name for that system is. They do not allow plain http downloads but redirect to https. So in order to cache these encryption must be broken on the fly.

On custom runs this works already with the mentioned extension. However when the build framework is used within a GH Actions Runner environment it would need to detect this and enable the extension automatically. No clue how to do that or overall if it is worth diving even deeper into this topic. Therefore this RFC to collect feedback.

Also lots of fail-safe checks are missing. Sometimes I had to mix run_host_command_logged and chroot_sdcard since pipes don't work using latter.

Documentation summary for feature / change

Yes, this would need documentation.

How Has This Been Tested?

  • [x] custom builds with ENABLE_EXTENSION
  • [ ] Test B

Checklist:

  • [no idea] My code follows the style guidelines of this project
  • [x] I have performed a self-review of my own code
  • [x] I have commented my code, particularly in hard-to-understand areas
  • [x] My changes generate no new warnings
  • [ ] Any dependent changes have been merged and published in downstream modules

View the full article

×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines