-
Hi, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
This function is responsible for handling of plaintext non-tunneled requests: Lines 140 to 171 in de1cd59 Probably you can just add cache there. I recommend extend the transport and wrap http.Transport used in there with something implementing http.RoundTripper interface and doing proper caching.
Transparent part probably would require changes here and there or some adapter in front of dumbproxy to intercept HTTP connections and forward them to a HTTP proxy without breaking HTTP semantics.
Not sure if this will make sense nowadays or in the nearest future. A lot of repos have now HTTPS transport and it won't be as simple to intercept it. On the other hand, there are already specialized off-the-shelf solutions for that problem like AptCacherNg (here is a fairly recent blog post about it). Another direction to look at is to use just Squid for that purpose, it was developed as a webcache from day one. On the contrary, dumbproxy is made for post-HTTP world. Finally, it caching can be achieved with some caching reverse proxy like nginx: https://www.apalrd.net/posts/2024/cluster_debcache/ |
Beta Was this translation helpful? Give feedback.
This function is responsible for handling of plaintext non-tunneled requests:
dumbproxy/handler/handler.go
Lines 140 to 171 in de1cd59