From 05a8559dff7a04d8c4109f98357321031c0981f9 Mon Sep 17 00:00:00 2001 From: Thomas Kriechbaumer Date: Mon, 18 Dec 2017 19:51:29 +0100 Subject: [PATCH] add doc string --- mitmproxy/master.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/mitmproxy/master.py b/mitmproxy/master.py index 9660c1371..de3b24e11 100644 --- a/mitmproxy/master.py +++ b/mitmproxy/master.py @@ -120,6 +120,11 @@ class Master: self.addons.trigger("done") def _change_reverse_host(self, f): + """ + When we load flows in reverse proxy mode, we adjust the target host to + the reverse proxy destination for all flows we load. This makes it very + easy to replay saved flows against a different host. + """ if self.options.mode.startswith("reverse:"): _, upstream_spec = server_spec.parse_with_mode(self.options.mode) f.request.host, f.request.port = upstream_spec.address