How to configure mitmproxy to intercept https?
The web gui is very comfortable. You can use mitmproxy
instead.
Run the proxy server $
mitmweb --listen-port 44700
Make sure that 44700 port is open in firewall. You can specify the IP of proxy with--listen-host
flag. I.E.--listen-host 192.168.0.10
or try--listen-host 0.0.0.0
if can not access remotely.Configure in the remote device the IP and port proxy.
Open browser in the remote device and go to http://mitm.it, is a local page, in a local DNS, that you can download and install the certs.
If android, you must specify a pin lock screen.Open web gui, by default in port 8081 in your browser:
http://127.0.0.1:8081/#/flows
Enjoy networks intercepts.
Grég
Updated on September 18, 2022Comments
-
Grég over 1 year
I am trying to use
mitmproxy
to debug somehttps
requests. I have configuredmitmproxy
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
mitmproxy
to listen tohttps
? - How do I tell
http
(the tool) to trust themitmproxy
CA
?
- Do I need to configure another port in
-
Federico Galli almost 6 yearsthis doesn't look like a valuable answer