Ran across this in a blog, written in Python, http://mitmproxy.org/
from the web page: *mitmproxy* is an SSL-capable, intercepting HTTP proxy. It provides a console interface that allows traffic flows to be inspected and edited on the fly. *mitmdump* is the command-line version of mitmproxy, with the same functionality but without the frills. Think tcpdump for HTTP.