mitmproxy icon indicating copy to clipboard operation
mitmproxy copied to clipboard

Add more commands to start applications with mitmproxy preconfigured

Open mhils opened this issue 2 years ago • 3 comments

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

  1. Take one of the targets above and figure out how to start it with a proxy server preconfigured.
  2. Extend the browser addon with a custom command that invokes the application.
  3. 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.

mhils avatar Apr 06 '22 09:04 mhils

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

roniemartinez avatar Apr 11 '22 17:04 roniemartinez

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 : ).

mohamedmostafadawood avatar Apr 11 '22 18:04 mohamedmostafadawood

Hi @mhils could I know the current state of this issue?

oge1ata avatar Mar 25 '24 12:03 oge1ata