Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Configure mitmweb with chrome

Tags:

mitmproxy

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

like image 823
user1383093 Avatar asked Apr 06 '17 07:04

user1383093


2 Answers

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.

like image 151
thisgeek Avatar answered Sep 22 '22 14:09

thisgeek


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


like image 44
Madhu Avatar answered Sep 19 '22 14:09

Madhu