This is a source code of BCMA's "Block Cloudflare MITM Attack".
PRs are welcome.
AMO: https://addons.mozilla.org/en-US/firefox/addon/bcma/