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-hostflag. I.E.--listen-host 192.168.0.10or try--listen-host 0.0.0.0if 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 3 months
I am trying to use
mitmproxyto debug somehttpsrequests. I have configuredmitmproxyto listen to a certain port:mitmproxy --listen-port 44700I have configured my environment properly:
export http_proxy=http://localhost:44700 export https_proxy=https://localhost:44700And this is working for
http:» http http://www.example.orgis hitting
mitmproxy, as expected.Buuut
httpsis 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?
- Do I need to configure another port in
-
Federico Galli over 4 yearsthis doesn't look like a valuable answer