How to do transparent rewrite with https requests?

Yves MARTIN <[email protected]> Tue, 27 May 2025 14:37:06 +0000
Newsgroups gmane.comp.web.squid.general
Message-ID <GVAP278MB000597CE77AB7A15B49DE4F8EE64A@GVAP278MB0005.CHEP278.PROD.OUTLOOK.COM>
Hello,

 

My team expects to transparently rewrite requests through squid, replacing
original URL/hostname by another target URL/host.

 

Main objective is to redirect original HTTPS requests triggered by "docker
pull alpine" to a local mirrored registry without obvious information in
user client that the obtained image comes from mirror: original image
location is preserved, no specific proxy or mirror configuration in docker
client/daemon to set.

 

To do so, we have used squid-urlrewrite and it works well for HTTP request,
even if rewrite targets HTTPS URL.

But when original request is HTTPS, connection still goes to original
URL/hostname IP address
https://github.com/rchunping/squid-urlrewrite/issues/3

According to debug logs, the original request hostname is resolved to IP
early and kept in internal context after squid-urlrewrite is invoked.

 

Do you have recommendations how to implement such a rewrite? Any idea how to
improve/fix current squid behavior?

 

Thank you in advance for your help

Best regards,

Yves

_______________________________________________
squid-users mailing list
[email protected]
https://lists.squid-cache.org/listinfo/squid-users
smime.p7s (application/pkcs7-signature, 6.6 KB) - not displayed