WEBrick proxy - https reqrite question


I have a small proxy server here (using WEBrick::HTTPProxyServer) that
makes certain modifications in text/html content returned to the browser
(with the ProxyContentHandler). It work fine except with https
which, of course, it can’t modify. Do you have any idea how can I make
that work with HTTP and HTTPS too? (In this case it is acceptable if
browser pops up warning dialogs because of bad certificates, or there’s
any other security downscale happening, like unencrypted/unauthenticated
traffic between the browser and the proxy, or so… Rewriting the
is way more important this time.)

Thanks for any of your ideas,