diff --git a/README.mkd b/README.mkd index 4c2af2da7..94405ab79 100644 --- a/README.mkd +++ b/README.mkd @@ -3,7 +3,7 @@ console interface that allows traffic flows to be inspected and edited on the fly. __mitmdump__ is the command-line version of mitmproxy, with the same -functionality but without the frills. Think tcpdump for HTTP. +functionality but without the user interface. Think tcpdump for HTTP. Both tools are fully documentented in the commandline _--help_ flag, and, in the case of __mitmproxy__, a built-in help page accessible through the _?_ @@ -17,7 +17,7 @@ Features - Save complete HTTP conversations for later replay and analysis. - Replay the client-side of an HTTP conversations. - Replay HTTP responses of a previously recorded server. -- Reverse proxy mode to forward traffic to a specified server +- Reverse proxy mode to forward traffic to a specified server. - Make scripted changes to HTTP traffic using Python. - SSL certificates for interception are generated on the fly. diff --git a/doc-src/reverseproxy.html b/doc-src/reverseproxy.html index e69de29bb..125be19ab 100644 --- a/doc-src/reverseproxy.html +++ b/doc-src/reverseproxy.html @@ -0,0 +1,8 @@ + +- command-line: _-R_ http[s]://hostname[:port] +- mitmproxy shortcut: _R_ + +In reverse proxy mode, mitmproxy acts as a standard HTTP server and forwards +all requests to the specified upstream server. Note that the displayed URL for +flows in this mode will use the value of the __Host__ header field from the +request, not the reverse proxy server. diff --git a/doc-src/screenshots/mitmproxy.png b/doc-src/screenshots/mitmproxy.png index 1766167ea..4dad77287 100644 Binary files a/doc-src/screenshots/mitmproxy.png and b/doc-src/screenshots/mitmproxy.png differ diff --git a/examples/flowbasic b/examples/flowbasic index d39813296..b419f9e75 100755 --- a/examples/flowbasic +++ b/examples/flowbasic @@ -30,10 +30,10 @@ class MyMaster(flow.FlowMaster): return f -ssl_config = proxy.SSLConfig( +config = proxy.ProxyConfig( cacert = os.path.expanduser("~/.mitmproxy/mitmproxy-ca.pem") ) state = flow.State() -server = proxy.ProxyServer(ssl_config, 8080) +server = proxy.ProxyServer(config, 8080) m = MyMaster(server, state) m.run() diff --git a/examples/stickycookies b/examples/stickycookies index b290f2fd1..88bf00638 100755 --- a/examples/stickycookies +++ b/examples/stickycookies @@ -34,9 +34,9 @@ class StickyMaster(controller.Master): msg._ack() -ssl_config = proxy.SSLConfig( +config = proxy.ProxyConfig( cacert = os.path.expanduser("~/.mitmproxy/mitmproxy-ca.pem") ) -server = proxy.ProxyServer(ssl_config, 8080) +server = proxy.ProxyServer(config, 8080) m = StickyMaster(server) m.run() diff --git a/libmproxy/proxy.py b/libmproxy/proxy.py index 8e0aa9cdb..583e533b2 100644 --- a/libmproxy/proxy.py +++ b/libmproxy/proxy.py @@ -30,7 +30,6 @@ class ProxyConfig: self.reverse_proxy = reverse_proxy - def read_headers(fp): """ Read a set of headers from a file pointer. Stop once a blank line