diff options
author | Maximilian Hils <git@maximilianhils.com> | 2014-09-06 12:43:32 +0200 |
---|---|---|
committer | Maximilian Hils <git@maximilianhils.com> | 2014-09-06 12:43:32 +0200 |
commit | fdd7b2f108717900e39e3d0ab220ee65b79304ef (patch) | |
tree | c3f5aed62bcf13378522968a1c77375dc8102b53 | |
parent | ccb61829175b6ecb15cc753c5d134fe7b445b2ef (diff) | |
parent | 0e0cff638c1e055275e77e2af0ae540542f77197 (diff) | |
download | mitmproxy-fdd7b2f108717900e39e3d0ab220ee65b79304ef.tar.gz mitmproxy-fdd7b2f108717900e39e3d0ab220ee65b79304ef.tar.bz2 mitmproxy-fdd7b2f108717900e39e3d0ab220ee65b79304ef.zip |
Merge branch 'issue_341' into server_change_api
-rw-r--r-- | doc-src/schematics/architecture.pdf | bin | 0 -> 182446 bytes | |||
-rw-r--r-- | doc-src/schematics/architecture.vsdx | bin | 0 -> 60572 bytes | |||
-rw-r--r-- | libmproxy/cmdline.py | 3 | ||||
-rw-r--r-- | test/test_proxy.py | 20 |
4 files changed, 17 insertions, 6 deletions
diff --git a/doc-src/schematics/architecture.pdf b/doc-src/schematics/architecture.pdf Binary files differnew file mode 100644 index 00000000..77f5ad58 --- /dev/null +++ b/doc-src/schematics/architecture.pdf diff --git a/doc-src/schematics/architecture.vsdx b/doc-src/schematics/architecture.vsdx Binary files differnew file mode 100644 index 00000000..9820434a --- /dev/null +++ b/doc-src/schematics/architecture.vsdx diff --git a/libmproxy/cmdline.py b/libmproxy/cmdline.py index b9e62b71..28156a59 100644 --- a/libmproxy/cmdline.py +++ b/libmproxy/cmdline.py @@ -421,8 +421,7 @@ def common_options(parser): "Proxy Authentication", """ Specify which users are allowed to access the proxy and the method - used for authenticating them. These options are ignored if the - proxy is in transparent or reverse proxy mode. + used for authenticating them. """ ) user_specification_group = group.add_mutually_exclusive_group() diff --git a/test/test_proxy.py b/test/test_proxy.py index 073e76b5..2f455992 100644 --- a/test/test_proxy.py +++ b/test/test_proxy.py @@ -78,12 +78,24 @@ class TestProcessProxyOptions: def test_no_transparent(self): self.assert_err("transparent mode not supported", "-T") + @mock.patch("libmproxy.platform.resolver") - def test_transparent_reverse(self, _): - self.assert_err("mutually exclusive", "-R", "http://localhost", "-T") - self.assert_noerr("-T") - self.assert_err("Invalid server specification", "-R", "reverse") + def test_modes(self, _): self.assert_noerr("-R", "http://localhost") + self.assert_err("expected one argument", "-R") + self.assert_err("Invalid server specification", "-R", "reverse") + + self.assert_noerr("-T") + + self.assert_noerr("-U", "http://localhost") + self.assert_err("expected one argument", "-U") + self.assert_err("Invalid server specification", "-U", "upstream") + + self.assert_noerr("--destination-server", "http://localhost") + self.assert_err("expected one argument", "--destination-server") + self.assert_err("Invalid server specification", "--destination-server", "manual") + + self.assert_err("mutually exclusive", "-R", "http://localhost", "-T") def test_client_certs(self): with tutils.tmpdir() as confdir: |