Create different multiple Har file according to the client

Hi Guys!
I was working on a project, one of the problem I have is I need to create the different HAR file according to different client, let’s say I have two iPhone using mitmproxy, and i need to create two different HAR file for each of them, now I am able to create one har file for two of them, can anyone help for this?

Thanks in advance!

Why not just run 2 instances of mitmproxy on 2 different ports? That’s the easiest way

Thanks for ur reply, I will try it, the thing is I may end up running many iOS devices like10 or even 20,
do u think running separate instance of mitmproxy for each device will scale? I mean will my laptop can handle it?
Another Question I have is, do u know how to export the session from command line while the proxy is running(without terminating the mitmproxy)?

Thanks!

  1. It won’t scale unless you write some sort of tool to automate the process. I did something similar a while back using a python flask app. 2. Not without modifying the example scripts unless they have changed recently.