Configure mitmweb with chrome
Asked Answered
A

2

6

I just want to use mitmweb to capture my chrome traffic. Can anyone share a simple example to configure chrome?

I started mitmweb :

enter image description here

But it's not capturing anything:

enter image description here

Accustom answered 6/4, 2017 at 7:27 Comment(0)
K
6

First, choose and install a proxy for the client you wish to use. Chrome has many options. Many of them are available as extensions, such as the NordVPN extension that @Madhu mentioned. You may also try searching for others, e.g. via the chrome webstore.

Once you've installed the extension:

  1. Start mitmweb (which you did). For anyone else who's reading this, the output will look something like the following, assuming you're using the default configuration:
Web server listening at http://127.0.0.1:8081/
Proxy server listening at http://*:8080
  1. In your browser, visit the URL where the proxy web server is listening, probably http://127.0.0.1:8081 (which you also did).
  2. Follow the instructions for configuring the extension to use the proxy server. In my case, I configure my extension to contact the server at http://127.0.0.1:8080.
  3. Just to be sure it works the first time, make sure the extension is configured to proxy all traffic once it's switched on. Remove any filtering or switching rules that may interfere with this intended behavior.
  4. Now switch on the extension and confirm that it has activated the settings you configured. (Some extensions support creating many configurations. Make sure you've selected the right one.)
  5. Visit any website (e.g. example.com) with the browser that has the extension.

At this point you should see the traffic captured in the proxy web server. If you don't, review your configuration. Check the protocol, any filtering and switching rules, and the port (if specified).

In my experience, you can use the same Chrome browser who's traffic you want to capture as the client for the proxy web server. It may depend on which extension you choose.

Koppel answered 20/2, 2020 at 22:29 Comment(1)
I use the Proxy SwitchyOmega extension.Koppel
F
1

I don't know much, but i'll try put my understandings here. When you run mitmweb, you are proxy server is listening on port 8080 and web server listening on 8081, that means you've to set your system or chrome proxy to port 8080 and open 127.0.0.1:8081 in different browser. This worked for me, so you can give it a try

To setup the proxy in chrome you can follow this link and in address field use

127.0.0.1

and enter

8080

as your port number. Open the link

127.0.0.1:8081

in a different browser


Fisher answered 31/8, 2017 at 9:35 Comment(1)
Are you sure this answers his question?Sarmatia

© 2022 - 2024 — McMap. All rights reserved.