I have tested the dup_and_replay script for mitmproxy version 2.0.0. However, I encountered a couple of problems.
Problem#1: This line of script "ctx.master.view.add(f)" leads to an error message:
"AttributeError: 'DumpMaster' object has no attributed 'view'"
Problem#2: then I go ahead and comment out the line mentioned in Problem#1, but the main mitmproxy thread got stuck when setting "block" to be True in the 'replay_request' function. But if I set 'block' to false, then I can see that the request is constantly replayed and response is received.
Do you know what is actually happening here?