mitmproxy
mitmproxy copied to clipboard
Add more commands to start applications with mitmproxy preconfigured
Many mitmproxy users only want to proxy one specific application. We already have a browser.start
command to boot up a Chrome instance, it would be very useful to have similar wrappers for other browsers and applications:
- [ ] Firefox
- [ ] Edge
- [ ] Safari
- [ ] Docker Containers
- [ ] Android Devices
Implementation Steps
- Take one of the targets above and figure out how to start it with a proxy server preconfigured.
- Extend the browser addon with a custom command that invokes the application.
- Add a test in https://github.com/mitmproxy/mitmproxy/blob/main/test/mitmproxy/addons/test_browser.py. These tests aren't particularly useful as we want to mock the actual application, but we require 100% test coverage for all builtin addons.
Maybe the browser launcher from HTTPToolkit will give you an idea.
I implemented a simple snippet to get the browser paths for OSX based on https://github.com/httptoolkit/browser-launcher/tree/master/lib/darwin
You can find it here: https://gist.github.com/roniemartinez/771b8a65013a87a9137ca29224fe455d
Maybe the browser launcher from HTTPToolkit will give you an idea.
I implemented a simple snippet to get the browser paths for OSX based on https://github.com/httptoolkit/browser-launcher/tree/master/lib/darwin
You can find it here: https://gist.github.com/roniemartinez/771b8a65013a87a9137ca29224fe455d
I sent you a message via Twitter to ask for some help. I really would appreciate your consideration : ).
Hi @mhils could I know the current state of this issue?