diff --git a/examples/dup_and_replay.py b/examples/dup_and_replay.py index b47bf951d..55d6ce7b2 100644 --- a/examples/dup_and_replay.py +++ b/examples/dup_and_replay.py @@ -1,7 +1,7 @@ -from mitmproxy import master +from mitmproxy import ctx def request(flow): - f = master.duplicate_flow(flow) + f = ctx.master.state.duplicate_flow(flow) f.request.path = "/changed" - master.replay_request(f, block=True, run_scripthooks=False) + ctx.master.replay_request(f, block=True, run_scripthooks=False) diff --git a/mitmproxy/ctx.py b/mitmproxy/ctx.py index 4ecfe79bc..adae8cf68 100644 --- a/mitmproxy/ctx.py +++ b/mitmproxy/ctx.py @@ -1,2 +1,2 @@ master = None # type: "mitmproxy.master.Master" -log = None # type: "mitmproxy.controller.Log" +log = None # type: "mitmproxy.log.Log"