I am trying to use mitmproxy to debug some https requests. I have configured mitmproxy to listen to a certain port:
mitmproxy --listen-port 44700
I have configured my environment properly:
export http_proxy=http://localhost:44700
export https_proxy=https://localhost:44700
And this is working for http:
» http http://www.example.org
is hitting mitmproxy, as expected.
Buuut https is failing:
» http https://www.example.org
Traceback (most recent call last):
File "/usr/bin/http", line 9, in <module>
load_entry_point('httpie==0.9.2', 'console_scripts', 'http')()
File "/usr/lib/python2.7/dist-packages/httpie/core.py", line 186, in main
error('%s: %s', type(e).__name__, str(e))
TypeError: __str__ returned non-string (type Error)
Questions:
- Do I need to configure another port in
mitmproxyto listen tohttps? - How do I tell
http(the tool) to trust themitmproxyCA?