aboutsummaryrefslogtreecommitdiffstats
path: root/mitmproxy/master.py
diff options
context:
space:
mode:
authorAldo Cortesi <aldo@nullcube.com>2017-03-06 20:30:49 +1300
committerAldo Cortesi <aldo@nullcube.com>2017-03-06 20:30:49 +1300
commit82163a1e680d608cdf2fb33f30dfcc6e142547a7 (patch)
treebb61c8e4c368207e43ae8ed1d14ca95eefb377bb /mitmproxy/master.py
parentf5fb6972aac9b4f17e0d0d34b2a5c347141f476c (diff)
downloadmitmproxy-82163a1e680d608cdf2fb33f30dfcc6e142547a7.tar.gz
mitmproxy-82163a1e680d608cdf2fb33f30dfcc6e142547a7.tar.bz2
mitmproxy-82163a1e680d608cdf2fb33f30dfcc6e142547a7.zip
Unify mode specification
We now have: --mode regular (the default) --mode transparent --mode socks5 --mode reverse:SPEC --mode upstream:SPEC Where SPEC is a host specification.
Diffstat (limited to 'mitmproxy/master.py')
-rw-r--r--mitmproxy/master.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/mitmproxy/master.py b/mitmproxy/master.py
index 633f32aa..8855452c 100644
--- a/mitmproxy/master.py
+++ b/mitmproxy/master.py
@@ -148,7 +148,7 @@ class Master:
Loads a flow
"""
if isinstance(f, http.HTTPFlow):
- if self.server and self.options.mode == "reverse":
+ if self.server and self.options.mode.startswith("reverse:"):
f.request.host = self.server.config.upstream_server.address[0]
f.request.port = self.server.config.upstream_server.address[1]
f.request.scheme = self.server.config.upstream_server.scheme