From a82ac9eaf0ccc0f7c9f9588e8f76e213a6a5330b Mon Sep 17 00:00:00 2001 From: Heikki Hannikainen Date: Thu, 16 Feb 2012 16:33:27 +0200 Subject: Implemented reverse proxy mode: -R upstreamhost:port makes the proxy accept a 'GET / HTTP/1.0' request and fill up the destination host and port from the ones given with -R (for example, "-R localhost:80"). --- libmproxy/cmdline.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'libmproxy/cmdline.py') diff --git a/libmproxy/cmdline.py b/libmproxy/cmdline.py index 6d1ffa3d..e7ca1bcf 100644 --- a/libmproxy/cmdline.py +++ b/libmproxy/cmdline.py @@ -64,6 +64,11 @@ def common_options(parser): action="store", type = "int", dest="port", default=8080, help = "Proxy service port." ) + parser.add_option( + "-R", + action="store", dest="reverse_upstream", default=None, + help="Reverse proxy: upstream server host:port" + ) parser.add_option( "-q", action="store_true", dest="quiet", -- cgit v1.2.3