Sometimes it's easier to use mitmproxy with an existing implementation than to read the documentation!