From b7701eb8c11dce5fdc00a3107a3eaacd80267346 Mon Sep 17 00:00:00 2001 From: Maximilian Hils Date: Wed, 17 Feb 2016 00:02:18 +0100 Subject: [PATCH 01/10] add combined MANIFEST.in and CHANGELOG --- mitmproxy/CHANGELOG => CHANGELOG | 85 ++++++++++++++++++++++++++++++++ MANIFEST.in | 4 ++ mitmproxy/MANIFEST.in | 2 - pathod/CHANGELOG | 83 ------------------------------- pathod/MANIFEST.in | 2 - 5 files changed, 89 insertions(+), 87 deletions(-) rename mitmproxy/CHANGELOG => CHANGELOG (85%) create mode 100644 MANIFEST.in delete mode 100644 mitmproxy/MANIFEST.in delete mode 100644 pathod/CHANGELOG delete mode 100644 pathod/MANIFEST.in diff --git a/mitmproxy/CHANGELOG b/CHANGELOG similarity index 85% rename from mitmproxy/CHANGELOG rename to CHANGELOG index b41b4a245..72d58d239 100644 --- a/mitmproxy/CHANGELOG +++ b/CHANGELOG @@ -224,6 +224,17 @@ * Countless bugfixes and other small improvements +7 November 2014: pathod 0.11: + + * Hugely improved SSL support, including dynamic generation of certificates + using the mitproxy cacert + + * pathoc -S dumps information on the remote SSL certificate chain + + * Big improvements to fuzzing, including random spec selection and memoization to avoid repeating randomly generated patterns + + * Reflected patterns, allowing you to embed a pathod server response specification in a pathoc request, resolving both on client side. This makes fuzzing proxies and other intermediate systems much better. + 28 January 2014: mitmproxy 0.10: @@ -264,6 +275,9 @@ * Many other small bugfixes and improvements. +25 August 2013: pathod 0.9.2: + + * Adapt to interface changes in netlib 16 June 2013: mitmproxy 0.9.1: @@ -323,6 +337,77 @@ * Proxy authentication to limit access to mitmproxy +15 May 2013: pathod 0.9 (version synced with mitmproxy): + + * Pathod proxy mode. You can now configure clients to use pathod as an + HTTP/S proxy. + + * Pathoc proxy support, including using CONNECT to tunnel directly to + targets. + + * Pathoc client certificate support. + + * API improvements, bugfixes. + + +16 November 2012: pathod 0.3: + + A release focusing on shoring up our fuzzing capabilities, especially with + pathoc. + + * pathoc -q and -r options, output full request and response text. + + * pathod -q and -r options, add full request and response text to pathod's + log buffer. + + * pathoc and pathod -x option, makes -q and -r options log in hex dump + format. + + * pathoc -C option, specify response codes to ignore. + + * pathoc -T option, instructs pathoc to ignore timeouts. + + * pathoc -o option, a one-shot mode that exits after the first non-ignored + response. + + * pathoc and pathod -e option, which explains the resulting message by + expanding random and generated portions, and logging a reproducible + specification. + + * Streamline the specification langauge. HTTP response message is now + specified using the "r" mnemonic. + + * Add a "u" mnemonic for specifying User-Agent strings. Add a set of + standard user-agent strings accessible through shortcuts. + + * Major internal refactoring and cleanup. + + * Many bugfixes. + + +22 August 2012: pathod 0.2: + + * Add pathoc, a pathological HTTP client. + + * Add libpathod.test, a truss for using pathod in unit tests. + + * Add an injection operator to the specification language. + + * Allow Python escape sequences in value literals. + + * Allow execution of requests and responses from file, using the new + operator. + + * Add daemonization to Pathod, and make it more robust for public-facing use. + + * Let pathod pick an arbitrary open port if -p 0 is specified. + + * Move from Tornado to netlib, the network library written for mitmproxy. + + * Move the web application to Flask. + + * Massively expand the documentation. + + 5 April 2012: mitmproxy 0.8: * Detailed tutorial for Android interception. Some features that land in diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 000000000..440a14ed7 --- /dev/null +++ b/MANIFEST.in @@ -0,0 +1,4 @@ +graft mitmproxy +graft pathod +graft netlib +recursive-exclude * *.pyc *.pyo *.swo *.swp *.map \ No newline at end of file diff --git a/mitmproxy/MANIFEST.in b/mitmproxy/MANIFEST.in deleted file mode 100644 index 54b57382b..000000000 --- a/mitmproxy/MANIFEST.in +++ /dev/null @@ -1,2 +0,0 @@ -graft mitmproxy -recursive-exclude * *.pyc *.pyo *.swo *.swp *.map \ No newline at end of file diff --git a/pathod/CHANGELOG b/pathod/CHANGELOG deleted file mode 100644 index 2de445b44..000000000 --- a/pathod/CHANGELOG +++ /dev/null @@ -1,83 +0,0 @@ -7 November 2014: pathod 0.11: - - * Hugely improved SSL support, including dynamic generation of certificates - using the mitproxy cacert - * pathoc -S dumps information on the remote SSL certificate chain - * Big improvements to fuzzing, including random spec selection and memoization to avoid repeating randomly generated patterns - * Reflected patterns, allowing you to embed a pathod server response specification in a pathoc request, resolving both on client side. This makes fuzzing proxies and other intermediate systems much better. - - -25 August 2013: pathod 0.9.2: - - * Adapt to interface changes in netlib - - -15 May 2013: pathod 0.9 (version synced with mitmproxy): - - * Pathod proxy mode. You can now configure clients to use pathod as an - HTTP/S proxy. - - * Pathoc proxy support, including using CONNECT to tunnel directly to - targets. - - * Pathoc client certificate support. - - * API improvements, bugfixes. - - -16 November 2012: pathod 0.3: - - A release focusing on shoring up our fuzzing capabilities, especially with - pathoc. - - * pathoc -q and -r options, output full request and response text. - - * pathod -q and -r options, add full request and response text to pathod's - log buffer. - - * pathoc and pathod -x option, makes -q and -r options log in hex dump - format. - - * pathoc -C option, specify response codes to ignore. - - * pathoc -T option, instructs pathoc to ignore timeouts. - - * pathoc -o option, a one-shot mode that exits after the first non-ignored - response. - - * pathoc and pathod -e option, which explains the resulting message by - expanding random and generated portions, and logging a reproducible - specification. - - * Streamline the specification langauge. HTTP response message is now - specified using the "r" mnemonic. - - * Add a "u" mnemonic for specifying User-Agent strings. Add a set of - standard user-agent strings accessible through shortcuts. - - * Major internal refactoring and cleanup. - - * Many bugfixes. - - -22 August 2012: pathod 0.2: - - * Add pathoc, a pathological HTTP client. - - * Add libpathod.test, a truss for using pathod in unit tests. - - * Add an injection operator to the specification language. - - * Allow Python escape sequences in value literals. - - * Allow execution of requests and responses from file, using the new + operator. - - * Add daemonization to Pathod, and make it more robust for public-facing use. - - * Let pathod pick an arbitrary open port if -p 0 is specified. - - * Move from Tornado to netlib, the network library written for mitmproxy. - - * Move the web application to Flask. - - * Massively expand the documentation. diff --git a/pathod/MANIFEST.in b/pathod/MANIFEST.in deleted file mode 100644 index a83fa08fa..000000000 --- a/pathod/MANIFEST.in +++ /dev/null @@ -1,2 +0,0 @@ -graft pathod -recursive-exclude * *.pyc *.pyo *.swo *.swp *.map \ No newline at end of file From 595d2a2fa09ea8c16507266a0c4d435bb1c68983 Mon Sep 17 00:00:00 2001 From: Will Coster Date: Tue, 16 Feb 2016 18:35:42 -0800 Subject: [PATCH 02/10] Add a content view for query parameters The query content view uses format_dict to display a table of query parameters and is made the default content view for requests with query parameters and no request body. To facilitate this the query parameter dictionary of HTTPRequests is added to the metadata content view parameter under the "query" key. Additionally, the logic for handling "no content" messages is moved from contentviews.get_content_view to ViewAuto. This is necessary as it allows the query content view to be displayed when there is no request body. --- mitmproxy/mitmproxy/console/flowview.py | 5 ++++- mitmproxy/mitmproxy/contentviews.py | 27 ++++++++++++++++++++----- test/mitmproxy/test_contentview.py | 21 +++++++++++++++++++ 3 files changed, 47 insertions(+), 6 deletions(-) diff --git a/mitmproxy/mitmproxy/console/flowview.py b/mitmproxy/mitmproxy/console/flowview.py index d2b98b684..f490732e4 100644 --- a/mitmproxy/mitmproxy/console/flowview.py +++ b/mitmproxy/mitmproxy/console/flowview.py @@ -193,8 +193,11 @@ class FlowView(tabs.Tabs): def _get_content_view(self, viewmode, message, max_lines, _): try: + query = None + if isinstance(message, HTTPRequest): + query = message.query description, lines = contentviews.get_content_view( - viewmode, message.content, headers=message.headers + viewmode, message.content, headers=message.headers, query=query ) except ContentViewException: s = "Content viewer failed: \n" + traceback.format_exc() diff --git a/mitmproxy/mitmproxy/contentviews.py b/mitmproxy/mitmproxy/contentviews.py index c0652c189..5335b59c5 100644 --- a/mitmproxy/mitmproxy/contentviews.py +++ b/mitmproxy/mitmproxy/contentviews.py @@ -8,7 +8,8 @@ in the future, e.g. to decode protobuf messages sent as WebSocket frames. Thus, the View API is very minimalistic. The only arguments are `data` and `**metadata`, where `data` is the actual content (as bytes). The contents on metadata depend on the protocol in -use. For HTTP, the message headers are passed as the ``headers`` keyword argument. +use. For HTTP, the message headers are passed as the ``headers`` keyword argument. For HTTP +requests, the query parameters are passed as the ``query`` keyword argument. """ from __future__ import (absolute_import, print_function, division) @@ -118,15 +119,19 @@ class ViewAuto(View): def __call__(self, data, **metadata): headers = metadata.get("headers", {}) ctype = headers.get("content-type") - if ctype: + if data and ctype: ct = parse_content_type(ctype) if ctype else None ct = "%s/%s" % (ct[0], ct[1]) if ct in content_types_map: return content_types_map[ct][0](data, **metadata) elif utils.isXML(data): return get("XML")(data, **metadata) - if utils.isMostlyBin(data): + if metadata.get("query"): + return get("Query")(data, **metadata) + if data and utils.isMostlyBin(data): return get("Hex")(data) + if not data: + return "No content", [] return get("Raw")(data) @@ -460,6 +465,19 @@ class ViewProtobuf(View): return "Protobuf", format_text(decoded) +class ViewQuery(View): + name = "Query" + prompt = ("query", "q") + content_types = [] + + def __call__(self, data, **metadata): + query = metadata.get("query") + if query: + return "Query", format_dict(query) + else: + return "Query", format_text("") + + class ViewWBXML(View): name = "WBXML" prompt = ("wbxml", "w") @@ -541,6 +559,7 @@ add(ViewCSS()) add(ViewURLEncoded()) add(ViewMultipart()) add(ViewImage()) +add(ViewQuery()) if pyamf: add(ViewAMF()) @@ -577,8 +596,6 @@ def get_content_view(viewmode, data, **metadata): Raises: ContentViewException, if the content view threw an error. """ - if not data: - return "No content", [] msg = [] headers = metadata.get("headers", {}) diff --git a/test/mitmproxy/test_contentview.py b/test/mitmproxy/test_contentview.py index 7f1d735e9..c00afa5f7 100644 --- a/test/mitmproxy/test_contentview.py +++ b/test/mitmproxy/test_contentview.py @@ -1,5 +1,6 @@ from mitmproxy.exceptions import ContentViewException from netlib.http import Headers +from netlib.odict import ODict import netlib.utils from netlib import encoding @@ -45,6 +46,19 @@ class TestContentView: ) assert f[0].startswith("XML") + f = v( + "", + headers=Headers() + ) + assert f[0] == "No content" + + f = v( + "", + headers=Headers(), + query=ODict([("foo", "bar")]), + ) + assert f[0] == "Query" + def test_view_urlencoded(self): d = netlib.utils.urlencode([("one", "two"), ("three", "four")]) v = cv.ViewURLEncoded() @@ -158,6 +172,13 @@ Larry h = Headers(content_type="unparseable") assert not view(v, headers=h) + def test_view_query(self): + d = "" + v = cv.ViewQuery() + f = v(d, query=ODict([("foo", "bar")])) + assert f[0] == "Query" + assert [x for x in f[1]] == [[("header", "foo: "), ("text", "bar")]] + def test_get_content_view(self): r = cv.get_content_view( cv.get("Raw"), From 262b4bc482381d8ce4caee7c16cc4c4d0d96d002 Mon Sep 17 00:00:00 2001 From: Thomas Kriechbaumer Date: Wed, 17 Feb 2016 15:34:31 +0100 Subject: [PATCH 03/10] upgrade h2, remove reset-stream hotfix --- mitmproxy/mitmproxy/protocol/http2.py | 15 --------------- mitmproxy/setup.py | 2 +- 2 files changed, 1 insertion(+), 16 deletions(-) diff --git a/mitmproxy/mitmproxy/protocol/http2.py b/mitmproxy/mitmproxy/protocol/http2.py index c121637c5..3fbc500a9 100644 --- a/mitmproxy/mitmproxy/protocol/http2.py +++ b/mitmproxy/mitmproxy/protocol/http2.py @@ -9,8 +9,6 @@ from netlib.exceptions import HttpException from netlib.http import Headers from netlib.utils import http2_read_raw_frame -import hyperframe -import h2 from h2.connection import H2Connection from h2.events import * @@ -232,19 +230,6 @@ class Http2Layer(Layer): stream.zombie = time.time() return - frame, _ = hyperframe.frame.Frame.parse_frame_header(raw_frame[:9]) - - if is_server: - list = self.server_reset_streams - else: - list = self.client_reset_streams - if frame.stream_id in list: - # this frame belongs to a reset stream - just ignore it - if isinstance(frame, hyperframe.frame.HeadersFrame) or isinstance(frame, hyperframe.frame.ContinuationFrame): - # we need to keep the hpack-decoder happy too - source_conn.h2.decoder.decode(raw_frame[9:]) - continue - events = source_conn.h2.receive_data(raw_frame) source_conn.send(source_conn.h2.data_to_send()) diff --git a/mitmproxy/setup.py b/mitmproxy/setup.py index 9d796ebbc..e2035a426 100644 --- a/mitmproxy/setup.py +++ b/mitmproxy/setup.py @@ -54,7 +54,7 @@ setup( # It is not considered best practice to use install_requires to pin dependencies to specific versions. install_requires=[ "netlib=={}".format(version.VERSION), - "h2>=2.1.0, <2.2", + "h2>=2.1.2, <3.0", "tornado>=4.3, <4.4", "configargparse>=0.10, <0.11", "pyperclip>=1.5.22, <1.6", From 10047a025fd80f0bbf7970141bf344166058f2b6 Mon Sep 17 00:00:00 2001 From: Aldo Cortesi Date: Thu, 18 Feb 2016 09:05:24 +1300 Subject: [PATCH 04/10] One CHANGELOG at the top of the repo --- mitmproxy/CHANGELOG => CHANGELOG | 20 +++++++- pathod/CHANGELOG | 83 -------------------------------- 2 files changed, 19 insertions(+), 84 deletions(-) rename mitmproxy/CHANGELOG => CHANGELOG (94%) delete mode 100644 pathod/CHANGELOG diff --git a/mitmproxy/CHANGELOG b/CHANGELOG similarity index 94% rename from mitmproxy/CHANGELOG rename to CHANGELOG index b41b4a245..f1f3f9fcc 100644 --- a/mitmproxy/CHANGELOG +++ b/CHANGELOG @@ -223,7 +223,15 @@ * Countless bugfixes and other small improvements + * pathod: Hugely improved SSL support, including dynamic generation of certificates + using the mitproxy cacert + * pathod: pathoc -S dumps information on the remote SSL certificate chain + + * pathod: Big improvements to fuzzing, including random spec selection and + memoization to avoid repeating randomly generated patterns + + * pathod: Reflected patterns, allowing you to embed a pathod server response specification in a pathoc request, resolving both on client side. This makes fuzzing proxies and other intermediate systems much better. 28 January 2014: mitmproxy 0.10: @@ -263,7 +271,7 @@ * Many other small bugfixes and improvements. - + * pathod: Adapt to interface changes in netlib 16 June 2013: mitmproxy 0.9.1: @@ -322,6 +330,16 @@ * Proxy authentication to limit access to mitmproxy + * pathod: Proxy mode. You can now configure clients to use pathod as an + HTTP/S proxy. + + * pathoc: Proxy support, including using CONNECT to tunnel directly to + targets. + + * pathoc: client certificate support. + + * pathod: API improvements, bugfixes. + 5 April 2012: mitmproxy 0.8: diff --git a/pathod/CHANGELOG b/pathod/CHANGELOG deleted file mode 100644 index 2de445b44..000000000 --- a/pathod/CHANGELOG +++ /dev/null @@ -1,83 +0,0 @@ -7 November 2014: pathod 0.11: - - * Hugely improved SSL support, including dynamic generation of certificates - using the mitproxy cacert - * pathoc -S dumps information on the remote SSL certificate chain - * Big improvements to fuzzing, including random spec selection and memoization to avoid repeating randomly generated patterns - * Reflected patterns, allowing you to embed a pathod server response specification in a pathoc request, resolving both on client side. This makes fuzzing proxies and other intermediate systems much better. - - -25 August 2013: pathod 0.9.2: - - * Adapt to interface changes in netlib - - -15 May 2013: pathod 0.9 (version synced with mitmproxy): - - * Pathod proxy mode. You can now configure clients to use pathod as an - HTTP/S proxy. - - * Pathoc proxy support, including using CONNECT to tunnel directly to - targets. - - * Pathoc client certificate support. - - * API improvements, bugfixes. - - -16 November 2012: pathod 0.3: - - A release focusing on shoring up our fuzzing capabilities, especially with - pathoc. - - * pathoc -q and -r options, output full request and response text. - - * pathod -q and -r options, add full request and response text to pathod's - log buffer. - - * pathoc and pathod -x option, makes -q and -r options log in hex dump - format. - - * pathoc -C option, specify response codes to ignore. - - * pathoc -T option, instructs pathoc to ignore timeouts. - - * pathoc -o option, a one-shot mode that exits after the first non-ignored - response. - - * pathoc and pathod -e option, which explains the resulting message by - expanding random and generated portions, and logging a reproducible - specification. - - * Streamline the specification langauge. HTTP response message is now - specified using the "r" mnemonic. - - * Add a "u" mnemonic for specifying User-Agent strings. Add a set of - standard user-agent strings accessible through shortcuts. - - * Major internal refactoring and cleanup. - - * Many bugfixes. - - -22 August 2012: pathod 0.2: - - * Add pathoc, a pathological HTTP client. - - * Add libpathod.test, a truss for using pathod in unit tests. - - * Add an injection operator to the specification language. - - * Allow Python escape sequences in value literals. - - * Allow execution of requests and responses from file, using the new + operator. - - * Add daemonization to Pathod, and make it more robust for public-facing use. - - * Let pathod pick an arbitrary open port if -p 0 is specified. - - * Move from Tornado to netlib, the network library written for mitmproxy. - - * Move the web application to Flask. - - * Massively expand the documentation. From 09abd7eb9a6dc10bbe71ca87e9da07dbe9b3ba54 Mon Sep 17 00:00:00 2001 From: Thomas Kriechbaumer Date: Wed, 17 Feb 2016 20:38:51 +0100 Subject: [PATCH 05/10] add issue template --- CONTRIBUTING.md | 39 --------------------------------------- README.rst | 27 ++++++++++++++++++++++++++- issue_template.md | 28 ++++++++++++++++++++++++++++ 3 files changed, 54 insertions(+), 40 deletions(-) delete mode 100644 CONTRIBUTING.md create mode 100644 issue_template.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md deleted file mode 100644 index ae948d736..000000000 --- a/CONTRIBUTING.md +++ /dev/null @@ -1,39 +0,0 @@ -# Contributing - -Thank you for your interest in contributing to mitmproxy! - -# Bug Reports - -Bug Reports are very welcome - please file them on the GitHub [issue tracker](https://github.com/mitmproxy/mitmproxy/issues). -You can use the following template to structure your report: - -``` -##### Steps to reproduce the problem: -1. -2. -3. - -##### What is the expected behavior? - - -##### What went wrong? - - -##### Any other comments? - - ---- -mitmproxy version: -Operating System: -``` - -# Feature Requests - -We're happy to hear what you'd like to see in mitmproxy. Please file feature requests on the GitHub [issue tracker](https://github.com/mitmproxy/mitmproxy/issues). - -# Patches - -We're always happy to accept patches. Please submit them in the form of pull requests to the main [mitmproxy repository](https://github.com/mitmproxy/mitmproxy/). -If you're working on something cool, please do not hesistate and get in touch! - -Instructions for setting up a development environment can be found in the [README](README.rst). diff --git a/README.rst b/README.rst index d62857001..d816a763b 100644 --- a/README.rst +++ b/README.rst @@ -82,7 +82,7 @@ Please ensure that all patches are accompanied by matching changes in the test suite. The project tries to maintain 100% test coverage. -Docs +Documentation ---- The mitmproxy documentation is build using Sphinx_, which is installed automatically if you set up a development @@ -100,6 +100,30 @@ The last command invokes `sphinx-autobuild`_, which watches the Sphinx directory the documentation when a change is detected. +Contributing +---- + +Thank you for your interest in contributing to mitmproxy! + +* Bug Reports + +Bug Reports are very welcome - please file them on the GitHub issue_tracker_. +Please make sure to fill out the template and provide as much information as +possible. + +* Feature Requests + +We're happy to hear what you'd like to see in mitmproxy. Please file feature +requests on the GitHub issue_tracker_. + +* Patches + +We're always happy to accept patches. Please submit them in the form of pull +requests to the this repository. If you're working on something cool, please do +not hesitate and get in touch! + + + .. |mitmproxy_site| image:: https://shields.mitmproxy.org/api/https%3A%2F%2F-mitmproxy.org-blue.svg :target: https://mitmproxy.org/ :alt: mitmproxy.org @@ -143,3 +167,4 @@ the documentation when a change is detected. .. _.env: https://github.com/mitmproxy/mitmproxy/blob/master/.env .. _Sphinx: http://sphinx-doc.org/ .. _sphinx-autobuild: https://pypi.python.org/pypi/sphinx-autobuild +.. _issue_tracker: https://github.com/mitmproxy/mitmproxy/issues diff --git a/issue_template.md b/issue_template.md new file mode 100644 index 000000000..01b736bee --- /dev/null +++ b/issue_template.md @@ -0,0 +1,28 @@ +##### Steps to reproduce the problem: +1. Launch mitmproxy +2. Press X +3. Click Y + +##### What is the expected behavior? + +It should display Z. + +##### What went wrong? + +It crashed with this error/trace: ... + +##### Any other comments? + +None. + +--- + +mitmproxy version: (e.g.: 0.16, git commit hash) + +mitmproxy installed from: (e.g.: pip, binary package, source) + +Operating System: (e.g.: Windows, OSX, Linux, with specific version) + +OpenSSL version: (e.g.: 1.0.2f, run `openssl version` in your shell) + +pyOpenSSL version: (e.g.: 0.15.1, run `import OpenSSL; print(OpenSSL.__version__)` in Python) From 92597f82ea8e4747ce1836ecd5eb2479486e8647 Mon Sep 17 00:00:00 2001 From: Aldo Cortesi Date: Thu, 18 Feb 2016 09:19:05 +1300 Subject: [PATCH 06/10] Docs and examples to top level --- .landscape.yml | 4 ++-- .travis.yml | 2 +- {mitmproxy/docs => docs}/.gitignore | 0 {mitmproxy/docs => docs}/Makefile | 0 {mitmproxy/docs => docs}/_templates/page.html | 0 {mitmproxy/docs => docs}/certinstall-webapp.png | Bin {mitmproxy/docs => docs}/certinstall.rst | 0 {mitmproxy/docs => docs}/conf.py | 0 {mitmproxy/docs => docs}/config.rst | 0 {mitmproxy/docs => docs}/custom-routing.txt | 0 {mitmproxy/docs => docs}/dev/addingviews.html | 0 {mitmproxy/docs => docs}/dev/architecture.rst | 0 {mitmproxy/docs => docs}/dev/exceptions.rst | 0 {mitmproxy/docs => docs}/dev/models.rst | 0 {mitmproxy/docs => docs}/dev/protocols.rst | 0 {mitmproxy/docs => docs}/dev/proxy.rst | 0 {mitmproxy/docs => docs}/dev/sslkeylogfile.rst | 0 {mitmproxy/docs => docs}/dev/testing.rst | 0 {mitmproxy/docs => docs}/favicon.ico | Bin {mitmproxy/docs => docs}/features/anticache.rst | 0 {mitmproxy/docs => docs}/features/clientreplay.rst | 0 {mitmproxy/docs => docs}/features/filters.rst | 0 {mitmproxy/docs => docs}/features/passthrough.rst | 0 {mitmproxy/docs => docs}/features/proxyauth.rst | 0 {mitmproxy/docs => docs}/features/replacements.rst | 0 .../docs => docs}/features/responsestreaming.rst | 0 {mitmproxy/docs => docs}/features/reverseproxy.rst | 0 {mitmproxy/docs => docs}/features/serverreplay.rst | 0 {mitmproxy/docs => docs}/features/setheaders.rst | 0 {mitmproxy/docs => docs}/features/socksproxy.rst | 0 {mitmproxy/docs => docs}/features/sticky.rst | 0 {mitmproxy/docs => docs}/features/tcpproxy.rst | 0 {mitmproxy/docs => docs}/features/upstreamcerts.rst | 0 {mitmproxy/docs => docs}/features/upstreamproxy.rst | 0 {mitmproxy/docs => docs}/howmitmproxy.rst | 0 {mitmproxy/docs => docs}/index.rst | 0 {mitmproxy/docs => docs}/install.rst | 0 {mitmproxy/docs => docs}/introduction.rst | 0 {mitmproxy/docs => docs}/mitmdump.rst | 0 {mitmproxy/docs => docs}/mitmproxy-docs.png | Bin {mitmproxy/docs => docs}/mitmproxy-long.png | Bin {mitmproxy/docs => docs}/mitmproxy.rst | 0 {mitmproxy/docs => docs}/modes.rst | 0 .../schematics/_explicit.graffle/data.plist | 0 .../schematics/_explicit.graffle/image3.icns | Bin .../schematics/_explicit.graffle/image6.tiff | Bin .../schematics/_explicit_https.graffle/data.plist | 0 .../schematics/_explicit_https.graffle/image3.icns | Bin .../schematics/_explicit_https.graffle/image6.tiff | Bin .../schematics/_transparent.graffle/data.plist | 0 .../schematics/_transparent.graffle/image3.icns | Bin .../schematics/_transparent.graffle/image6.tiff | Bin .../_transparent_https.graffle/data.plist | 0 .../_transparent_https.graffle/image3.icns | Bin .../_transparent_https.graffle/image6.tiff | Bin .../docs => docs}/schematics/architecture.pdf | Bin .../docs => docs}/schematics/architecture.png | Bin .../docs => docs}/schematics/architecture.vsdx | Bin .../how-mitmproxy-works-explicit-https.png | Bin .../schematics/how-mitmproxy-works-explicit.png | Bin .../how-mitmproxy-works-transparent-https.png | Bin .../schematics/how-mitmproxy-works-transparent.png | Bin .../schematics/proxy-modes-flowchart.png | Bin .../schematics/proxy-modes-regular.png | Bin .../schematics/proxy-modes-reverse.png | Bin .../schematics/proxy-modes-transparent-1.png | Bin .../schematics/proxy-modes-transparent-2.png | Bin .../schematics/proxy-modes-transparent-3.png | Bin .../schematics/proxy-modes-transparent-wrong.png | Bin .../schematics/proxy-modes-upstream.png | Bin {mitmproxy/docs => docs}/schematics/proxy-modes.pdf | Bin .../docs => docs}/schematics/proxy-modes.vsdx | Bin .../docs => docs}/screenshots/firefox3-import.jpg | Bin .../docs => docs}/screenshots/firefox3-trust.jpg | Bin {mitmproxy/docs => docs}/screenshots/firefox3.jpg | Bin .../docs => docs}/screenshots/ios-gateway.png | Bin .../docs => docs}/screenshots/ios-installed.png | Bin {mitmproxy/docs => docs}/screenshots/ios-manual.png | Bin .../docs => docs}/screenshots/ios-profile.png | Bin .../docs => docs}/screenshots/ios-reverse.png | Bin .../docs => docs}/screenshots/ios-warning.png | Bin .../screenshots/mitmproxy-flowview.png | Bin .../screenshots/mitmproxy-intercept-filt.png | Bin .../screenshots/mitmproxy-intercept-mid.png | Bin .../screenshots/mitmproxy-intercept-options.png | Bin .../screenshots/mitmproxy-intercept-result.png | Bin .../screenshots/mitmproxy-kveditor-editmode.png | Bin .../screenshots/mitmproxy-kveditor.png | Bin {mitmproxy/docs => docs}/screenshots/mitmproxy.png | Bin .../screenshots/osx-addcert-alwaystrust.png | Bin .../screenshots/win7-certstore-trustedroot.png | Bin .../docs => docs}/screenshots/win7-certstore.png | Bin .../docs => docs}/screenshots/win7-wizard.png | Bin .../screenshots/winpythoninstaller.jpg | Bin .../docs => docs}/scripting/inlinescripts.rst | 0 {mitmproxy/docs => docs}/scripting/mitmproxy.rst | 0 {mitmproxy/docs => docs}/transparent.rst | 0 {mitmproxy/docs => docs}/transparent/linux.rst | 0 {mitmproxy/docs => docs}/transparent/osx.rst | 0 {mitmproxy/docs => docs}/tutorials/30second.rst | 0 {mitmproxy/docs => docs}/tutorials/gamecenter.rst | 0 {mitmproxy/docs => docs}/tutorials/leaderboard.png | Bin {mitmproxy/docs => docs}/tutorials/one.png | Bin {mitmproxy/docs => docs}/tutorials/supermega.png | Bin .../docs => docs}/tutorials/transparent-dhcp.rst | 0 .../tutorials/transparent-dhcp/step1_proxy.png | Bin .../tutorials/transparent-dhcp/step1_vbox_eth0.png | Bin .../tutorials/transparent-dhcp/step1_vbox_eth1.png | Bin .../tutorials/transparent-dhcp/step2_proxied_vm.png | Bin {mitmproxy/examples => examples}/README | 0 {mitmproxy/examples => examples}/add_header.py | 0 .../examples => examples}/change_upstream_proxy.py | 0 .../examples => examples}/custom_contentviews.py | 0 {mitmproxy/examples => examples}/dns_spoofing.py | 0 {mitmproxy/examples => examples}/dup_and_replay.py | 0 {mitmproxy/examples => examples}/filt.py | 0 {mitmproxy/examples => examples}/flowbasic | 0 {mitmproxy/examples => examples}/flowwriter.py | 0 {mitmproxy/examples => examples}/har_extractor.py | 0 {mitmproxy/examples => examples}/iframe_injector.py | 0 .../examples => examples}/mitmproxywrapper.py | 0 {mitmproxy/examples => examples}/modify_form.py | 0 .../examples => examples}/modify_querystring.py | 0 .../examples => examples}/modify_response_body.py | 0 {mitmproxy/examples => examples}/nonblocking.py | 0 {mitmproxy/examples => examples}/proxapp.py | 0 {mitmproxy/examples => examples}/read_dumpfile | 0 .../examples => examples}/redirect_requests.py | 0 {mitmproxy/examples => examples}/sslstrip.py | 0 {mitmproxy/examples => examples}/stickycookies | 0 {mitmproxy/examples => examples}/stream.py | 0 {mitmproxy/examples => examples}/stream_modify.py | 0 {mitmproxy/examples => examples}/stub.py | 0 {mitmproxy/examples => examples}/tcp_message.py | 0 {mitmproxy/examples => examples}/tls_passthrough.py | 0 .../examples => examples}/upsidedownternet.py | 0 test/mitmproxy/test_examples.py | 2 +- 137 files changed, 4 insertions(+), 4 deletions(-) rename {mitmproxy/docs => docs}/.gitignore (100%) rename {mitmproxy/docs => docs}/Makefile (100%) rename {mitmproxy/docs => docs}/_templates/page.html (100%) rename {mitmproxy/docs => docs}/certinstall-webapp.png (100%) rename {mitmproxy/docs => docs}/certinstall.rst (100%) rename {mitmproxy/docs => docs}/conf.py (100%) rename {mitmproxy/docs => docs}/config.rst (100%) rename {mitmproxy/docs => docs}/custom-routing.txt (100%) rename {mitmproxy/docs => docs}/dev/addingviews.html (100%) rename {mitmproxy/docs => docs}/dev/architecture.rst (100%) rename {mitmproxy/docs => docs}/dev/exceptions.rst (100%) rename {mitmproxy/docs => docs}/dev/models.rst (100%) rename {mitmproxy/docs => docs}/dev/protocols.rst (100%) rename {mitmproxy/docs => docs}/dev/proxy.rst (100%) rename {mitmproxy/docs => docs}/dev/sslkeylogfile.rst (100%) rename {mitmproxy/docs => docs}/dev/testing.rst (100%) rename {mitmproxy/docs => docs}/favicon.ico (100%) rename {mitmproxy/docs => docs}/features/anticache.rst (100%) rename {mitmproxy/docs => docs}/features/clientreplay.rst (100%) rename {mitmproxy/docs => docs}/features/filters.rst (100%) rename {mitmproxy/docs => docs}/features/passthrough.rst (100%) rename {mitmproxy/docs => docs}/features/proxyauth.rst (100%) rename {mitmproxy/docs => docs}/features/replacements.rst (100%) rename {mitmproxy/docs => docs}/features/responsestreaming.rst (100%) rename {mitmproxy/docs => docs}/features/reverseproxy.rst (100%) rename {mitmproxy/docs => docs}/features/serverreplay.rst (100%) rename {mitmproxy/docs => docs}/features/setheaders.rst (100%) rename {mitmproxy/docs => docs}/features/socksproxy.rst (100%) rename {mitmproxy/docs => docs}/features/sticky.rst (100%) rename {mitmproxy/docs => docs}/features/tcpproxy.rst (100%) rename {mitmproxy/docs => docs}/features/upstreamcerts.rst (100%) rename {mitmproxy/docs => docs}/features/upstreamproxy.rst (100%) rename {mitmproxy/docs => docs}/howmitmproxy.rst (100%) rename {mitmproxy/docs => docs}/index.rst (100%) rename {mitmproxy/docs => docs}/install.rst (100%) rename {mitmproxy/docs => docs}/introduction.rst (100%) rename {mitmproxy/docs => docs}/mitmdump.rst (100%) rename {mitmproxy/docs => docs}/mitmproxy-docs.png (100%) rename {mitmproxy/docs => docs}/mitmproxy-long.png (100%) rename {mitmproxy/docs => docs}/mitmproxy.rst (100%) rename {mitmproxy/docs => docs}/modes.rst (100%) rename {mitmproxy/docs => docs}/schematics/_explicit.graffle/data.plist (100%) rename {mitmproxy/docs => docs}/schematics/_explicit.graffle/image3.icns (100%) rename {mitmproxy/docs => docs}/schematics/_explicit.graffle/image6.tiff (100%) rename {mitmproxy/docs => docs}/schematics/_explicit_https.graffle/data.plist (100%) rename {mitmproxy/docs => docs}/schematics/_explicit_https.graffle/image3.icns (100%) rename {mitmproxy/docs => docs}/schematics/_explicit_https.graffle/image6.tiff (100%) rename {mitmproxy/docs => docs}/schematics/_transparent.graffle/data.plist (100%) rename {mitmproxy/docs => docs}/schematics/_transparent.graffle/image3.icns (100%) rename {mitmproxy/docs => docs}/schematics/_transparent.graffle/image6.tiff (100%) rename {mitmproxy/docs => docs}/schematics/_transparent_https.graffle/data.plist (100%) rename {mitmproxy/docs => docs}/schematics/_transparent_https.graffle/image3.icns (100%) rename {mitmproxy/docs => docs}/schematics/_transparent_https.graffle/image6.tiff (100%) rename {mitmproxy/docs => docs}/schematics/architecture.pdf (100%) rename {mitmproxy/docs => docs}/schematics/architecture.png (100%) rename {mitmproxy/docs => docs}/schematics/architecture.vsdx (100%) rename {mitmproxy/docs => docs}/schematics/how-mitmproxy-works-explicit-https.png (100%) rename {mitmproxy/docs => docs}/schematics/how-mitmproxy-works-explicit.png (100%) rename {mitmproxy/docs => docs}/schematics/how-mitmproxy-works-transparent-https.png (100%) rename {mitmproxy/docs => docs}/schematics/how-mitmproxy-works-transparent.png (100%) rename {mitmproxy/docs => docs}/schematics/proxy-modes-flowchart.png (100%) rename {mitmproxy/docs => docs}/schematics/proxy-modes-regular.png (100%) rename {mitmproxy/docs => docs}/schematics/proxy-modes-reverse.png (100%) rename {mitmproxy/docs => docs}/schematics/proxy-modes-transparent-1.png (100%) rename {mitmproxy/docs => docs}/schematics/proxy-modes-transparent-2.png (100%) rename {mitmproxy/docs => docs}/schematics/proxy-modes-transparent-3.png (100%) rename {mitmproxy/docs => docs}/schematics/proxy-modes-transparent-wrong.png (100%) rename {mitmproxy/docs => docs}/schematics/proxy-modes-upstream.png (100%) rename {mitmproxy/docs => docs}/schematics/proxy-modes.pdf (100%) rename {mitmproxy/docs => docs}/schematics/proxy-modes.vsdx (100%) rename {mitmproxy/docs => docs}/screenshots/firefox3-import.jpg (100%) rename {mitmproxy/docs => docs}/screenshots/firefox3-trust.jpg (100%) rename {mitmproxy/docs => docs}/screenshots/firefox3.jpg (100%) rename {mitmproxy/docs => docs}/screenshots/ios-gateway.png (100%) rename {mitmproxy/docs => docs}/screenshots/ios-installed.png (100%) rename {mitmproxy/docs => docs}/screenshots/ios-manual.png (100%) rename {mitmproxy/docs => docs}/screenshots/ios-profile.png (100%) rename {mitmproxy/docs => docs}/screenshots/ios-reverse.png (100%) rename {mitmproxy/docs => docs}/screenshots/ios-warning.png (100%) rename {mitmproxy/docs => docs}/screenshots/mitmproxy-flowview.png (100%) rename {mitmproxy/docs => docs}/screenshots/mitmproxy-intercept-filt.png (100%) rename {mitmproxy/docs => docs}/screenshots/mitmproxy-intercept-mid.png (100%) rename {mitmproxy/docs => docs}/screenshots/mitmproxy-intercept-options.png (100%) rename {mitmproxy/docs => docs}/screenshots/mitmproxy-intercept-result.png (100%) rename {mitmproxy/docs => docs}/screenshots/mitmproxy-kveditor-editmode.png (100%) rename {mitmproxy/docs => docs}/screenshots/mitmproxy-kveditor.png (100%) rename {mitmproxy/docs => docs}/screenshots/mitmproxy.png (100%) rename {mitmproxy/docs => docs}/screenshots/osx-addcert-alwaystrust.png (100%) rename {mitmproxy/docs => docs}/screenshots/win7-certstore-trustedroot.png (100%) rename {mitmproxy/docs => docs}/screenshots/win7-certstore.png (100%) rename {mitmproxy/docs => docs}/screenshots/win7-wizard.png (100%) rename {mitmproxy/docs => docs}/screenshots/winpythoninstaller.jpg (100%) rename {mitmproxy/docs => docs}/scripting/inlinescripts.rst (100%) rename {mitmproxy/docs => docs}/scripting/mitmproxy.rst (100%) rename {mitmproxy/docs => docs}/transparent.rst (100%) rename {mitmproxy/docs => docs}/transparent/linux.rst (100%) rename {mitmproxy/docs => docs}/transparent/osx.rst (100%) rename {mitmproxy/docs => docs}/tutorials/30second.rst (100%) rename {mitmproxy/docs => docs}/tutorials/gamecenter.rst (100%) rename {mitmproxy/docs => docs}/tutorials/leaderboard.png (100%) rename {mitmproxy/docs => docs}/tutorials/one.png (100%) rename {mitmproxy/docs => docs}/tutorials/supermega.png (100%) rename {mitmproxy/docs => docs}/tutorials/transparent-dhcp.rst (100%) rename {mitmproxy/docs => docs}/tutorials/transparent-dhcp/step1_proxy.png (100%) rename {mitmproxy/docs => docs}/tutorials/transparent-dhcp/step1_vbox_eth0.png (100%) rename {mitmproxy/docs => docs}/tutorials/transparent-dhcp/step1_vbox_eth1.png (100%) rename {mitmproxy/docs => docs}/tutorials/transparent-dhcp/step2_proxied_vm.png (100%) rename {mitmproxy/examples => examples}/README (100%) rename {mitmproxy/examples => examples}/add_header.py (100%) rename {mitmproxy/examples => examples}/change_upstream_proxy.py (100%) rename {mitmproxy/examples => examples}/custom_contentviews.py (100%) rename {mitmproxy/examples => examples}/dns_spoofing.py (100%) rename {mitmproxy/examples => examples}/dup_and_replay.py (100%) rename {mitmproxy/examples => examples}/filt.py (100%) rename {mitmproxy/examples => examples}/flowbasic (100%) rename {mitmproxy/examples => examples}/flowwriter.py (100%) rename {mitmproxy/examples => examples}/har_extractor.py (100%) rename {mitmproxy/examples => examples}/iframe_injector.py (100%) rename {mitmproxy/examples => examples}/mitmproxywrapper.py (100%) rename {mitmproxy/examples => examples}/modify_form.py (100%) rename {mitmproxy/examples => examples}/modify_querystring.py (100%) rename {mitmproxy/examples => examples}/modify_response_body.py (100%) rename {mitmproxy/examples => examples}/nonblocking.py (100%) rename {mitmproxy/examples => examples}/proxapp.py (100%) rename {mitmproxy/examples => examples}/read_dumpfile (100%) rename {mitmproxy/examples => examples}/redirect_requests.py (100%) rename {mitmproxy/examples => examples}/sslstrip.py (100%) rename {mitmproxy/examples => examples}/stickycookies (100%) rename {mitmproxy/examples => examples}/stream.py (100%) rename {mitmproxy/examples => examples}/stream_modify.py (100%) rename {mitmproxy/examples => examples}/stub.py (100%) rename {mitmproxy/examples => examples}/tcp_message.py (100%) rename {mitmproxy/examples => examples}/tls_passthrough.py (100%) rename {mitmproxy/examples => examples}/upsidedownternet.py (100%) diff --git a/.landscape.yml b/.landscape.yml index 1cf78412c..d4f32733f 100644 --- a/.landscape.yml +++ b/.landscape.yml @@ -1,6 +1,6 @@ ignore-paths: - - mitmproxy/docs - - mitmproxy/examples + - docs + - examples - mitmproxy/mitmproxy/contrib - mitmproxy/web max-line-length: 140 diff --git a/.travis.yml b/.travis.yml index 06b31773c..5804b5c7b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -25,7 +25,7 @@ matrix: env: SCOPE="netlib" NO_ALPN=1 - python: 2.7 env: DOCS=1 - script: 'cd mitmproxy/docs && make html' + script: 'cd docs && make html' allow_failures: - python: pypy diff --git a/mitmproxy/docs/.gitignore b/docs/.gitignore similarity index 100% rename from mitmproxy/docs/.gitignore rename to docs/.gitignore diff --git a/mitmproxy/docs/Makefile b/docs/Makefile similarity index 100% rename from mitmproxy/docs/Makefile rename to docs/Makefile diff --git a/mitmproxy/docs/_templates/page.html b/docs/_templates/page.html similarity index 100% rename from mitmproxy/docs/_templates/page.html rename to docs/_templates/page.html diff --git a/mitmproxy/docs/certinstall-webapp.png b/docs/certinstall-webapp.png similarity index 100% rename from mitmproxy/docs/certinstall-webapp.png rename to docs/certinstall-webapp.png diff --git a/mitmproxy/docs/certinstall.rst b/docs/certinstall.rst similarity index 100% rename from mitmproxy/docs/certinstall.rst rename to docs/certinstall.rst diff --git a/mitmproxy/docs/conf.py b/docs/conf.py similarity index 100% rename from mitmproxy/docs/conf.py rename to docs/conf.py diff --git a/mitmproxy/docs/config.rst b/docs/config.rst similarity index 100% rename from mitmproxy/docs/config.rst rename to docs/config.rst diff --git a/mitmproxy/docs/custom-routing.txt b/docs/custom-routing.txt similarity index 100% rename from mitmproxy/docs/custom-routing.txt rename to docs/custom-routing.txt diff --git a/mitmproxy/docs/dev/addingviews.html b/docs/dev/addingviews.html similarity index 100% rename from mitmproxy/docs/dev/addingviews.html rename to docs/dev/addingviews.html diff --git a/mitmproxy/docs/dev/architecture.rst b/docs/dev/architecture.rst similarity index 100% rename from mitmproxy/docs/dev/architecture.rst rename to docs/dev/architecture.rst diff --git a/mitmproxy/docs/dev/exceptions.rst b/docs/dev/exceptions.rst similarity index 100% rename from mitmproxy/docs/dev/exceptions.rst rename to docs/dev/exceptions.rst diff --git a/mitmproxy/docs/dev/models.rst b/docs/dev/models.rst similarity index 100% rename from mitmproxy/docs/dev/models.rst rename to docs/dev/models.rst diff --git a/mitmproxy/docs/dev/protocols.rst b/docs/dev/protocols.rst similarity index 100% rename from mitmproxy/docs/dev/protocols.rst rename to docs/dev/protocols.rst diff --git a/mitmproxy/docs/dev/proxy.rst b/docs/dev/proxy.rst similarity index 100% rename from mitmproxy/docs/dev/proxy.rst rename to docs/dev/proxy.rst diff --git a/mitmproxy/docs/dev/sslkeylogfile.rst b/docs/dev/sslkeylogfile.rst similarity index 100% rename from mitmproxy/docs/dev/sslkeylogfile.rst rename to docs/dev/sslkeylogfile.rst diff --git a/mitmproxy/docs/dev/testing.rst b/docs/dev/testing.rst similarity index 100% rename from mitmproxy/docs/dev/testing.rst rename to docs/dev/testing.rst diff --git a/mitmproxy/docs/favicon.ico b/docs/favicon.ico similarity index 100% rename from mitmproxy/docs/favicon.ico rename to docs/favicon.ico diff --git a/mitmproxy/docs/features/anticache.rst b/docs/features/anticache.rst similarity index 100% rename from mitmproxy/docs/features/anticache.rst rename to docs/features/anticache.rst diff --git a/mitmproxy/docs/features/clientreplay.rst b/docs/features/clientreplay.rst similarity index 100% rename from mitmproxy/docs/features/clientreplay.rst rename to docs/features/clientreplay.rst diff --git a/mitmproxy/docs/features/filters.rst b/docs/features/filters.rst similarity index 100% rename from mitmproxy/docs/features/filters.rst rename to docs/features/filters.rst diff --git a/mitmproxy/docs/features/passthrough.rst b/docs/features/passthrough.rst similarity index 100% rename from mitmproxy/docs/features/passthrough.rst rename to docs/features/passthrough.rst diff --git a/mitmproxy/docs/features/proxyauth.rst b/docs/features/proxyauth.rst similarity index 100% rename from mitmproxy/docs/features/proxyauth.rst rename to docs/features/proxyauth.rst diff --git a/mitmproxy/docs/features/replacements.rst b/docs/features/replacements.rst similarity index 100% rename from mitmproxy/docs/features/replacements.rst rename to docs/features/replacements.rst diff --git a/mitmproxy/docs/features/responsestreaming.rst b/docs/features/responsestreaming.rst similarity index 100% rename from mitmproxy/docs/features/responsestreaming.rst rename to docs/features/responsestreaming.rst diff --git a/mitmproxy/docs/features/reverseproxy.rst b/docs/features/reverseproxy.rst similarity index 100% rename from mitmproxy/docs/features/reverseproxy.rst rename to docs/features/reverseproxy.rst diff --git a/mitmproxy/docs/features/serverreplay.rst b/docs/features/serverreplay.rst similarity index 100% rename from mitmproxy/docs/features/serverreplay.rst rename to docs/features/serverreplay.rst diff --git a/mitmproxy/docs/features/setheaders.rst b/docs/features/setheaders.rst similarity index 100% rename from mitmproxy/docs/features/setheaders.rst rename to docs/features/setheaders.rst diff --git a/mitmproxy/docs/features/socksproxy.rst b/docs/features/socksproxy.rst similarity index 100% rename from mitmproxy/docs/features/socksproxy.rst rename to docs/features/socksproxy.rst diff --git a/mitmproxy/docs/features/sticky.rst b/docs/features/sticky.rst similarity index 100% rename from mitmproxy/docs/features/sticky.rst rename to docs/features/sticky.rst diff --git a/mitmproxy/docs/features/tcpproxy.rst b/docs/features/tcpproxy.rst similarity index 100% rename from mitmproxy/docs/features/tcpproxy.rst rename to docs/features/tcpproxy.rst diff --git a/mitmproxy/docs/features/upstreamcerts.rst b/docs/features/upstreamcerts.rst similarity index 100% rename from mitmproxy/docs/features/upstreamcerts.rst rename to docs/features/upstreamcerts.rst diff --git a/mitmproxy/docs/features/upstreamproxy.rst b/docs/features/upstreamproxy.rst similarity index 100% rename from mitmproxy/docs/features/upstreamproxy.rst rename to docs/features/upstreamproxy.rst diff --git a/mitmproxy/docs/howmitmproxy.rst b/docs/howmitmproxy.rst similarity index 100% rename from mitmproxy/docs/howmitmproxy.rst rename to docs/howmitmproxy.rst diff --git a/mitmproxy/docs/index.rst b/docs/index.rst similarity index 100% rename from mitmproxy/docs/index.rst rename to docs/index.rst diff --git a/mitmproxy/docs/install.rst b/docs/install.rst similarity index 100% rename from mitmproxy/docs/install.rst rename to docs/install.rst diff --git a/mitmproxy/docs/introduction.rst b/docs/introduction.rst similarity index 100% rename from mitmproxy/docs/introduction.rst rename to docs/introduction.rst diff --git a/mitmproxy/docs/mitmdump.rst b/docs/mitmdump.rst similarity index 100% rename from mitmproxy/docs/mitmdump.rst rename to docs/mitmdump.rst diff --git a/mitmproxy/docs/mitmproxy-docs.png b/docs/mitmproxy-docs.png similarity index 100% rename from mitmproxy/docs/mitmproxy-docs.png rename to docs/mitmproxy-docs.png diff --git a/mitmproxy/docs/mitmproxy-long.png b/docs/mitmproxy-long.png similarity index 100% rename from mitmproxy/docs/mitmproxy-long.png rename to docs/mitmproxy-long.png diff --git a/mitmproxy/docs/mitmproxy.rst b/docs/mitmproxy.rst similarity index 100% rename from mitmproxy/docs/mitmproxy.rst rename to docs/mitmproxy.rst diff --git a/mitmproxy/docs/modes.rst b/docs/modes.rst similarity index 100% rename from mitmproxy/docs/modes.rst rename to docs/modes.rst diff --git a/mitmproxy/docs/schematics/_explicit.graffle/data.plist b/docs/schematics/_explicit.graffle/data.plist similarity index 100% rename from mitmproxy/docs/schematics/_explicit.graffle/data.plist rename to docs/schematics/_explicit.graffle/data.plist diff --git a/mitmproxy/docs/schematics/_explicit.graffle/image3.icns b/docs/schematics/_explicit.graffle/image3.icns similarity index 100% rename from mitmproxy/docs/schematics/_explicit.graffle/image3.icns rename to docs/schematics/_explicit.graffle/image3.icns diff --git a/mitmproxy/docs/schematics/_explicit.graffle/image6.tiff b/docs/schematics/_explicit.graffle/image6.tiff similarity index 100% rename from mitmproxy/docs/schematics/_explicit.graffle/image6.tiff rename to docs/schematics/_explicit.graffle/image6.tiff diff --git a/mitmproxy/docs/schematics/_explicit_https.graffle/data.plist b/docs/schematics/_explicit_https.graffle/data.plist similarity index 100% rename from mitmproxy/docs/schematics/_explicit_https.graffle/data.plist rename to docs/schematics/_explicit_https.graffle/data.plist diff --git a/mitmproxy/docs/schematics/_explicit_https.graffle/image3.icns b/docs/schematics/_explicit_https.graffle/image3.icns similarity index 100% rename from mitmproxy/docs/schematics/_explicit_https.graffle/image3.icns rename to docs/schematics/_explicit_https.graffle/image3.icns diff --git a/mitmproxy/docs/schematics/_explicit_https.graffle/image6.tiff b/docs/schematics/_explicit_https.graffle/image6.tiff similarity index 100% rename from mitmproxy/docs/schematics/_explicit_https.graffle/image6.tiff rename to docs/schematics/_explicit_https.graffle/image6.tiff diff --git a/mitmproxy/docs/schematics/_transparent.graffle/data.plist b/docs/schematics/_transparent.graffle/data.plist similarity index 100% rename from mitmproxy/docs/schematics/_transparent.graffle/data.plist rename to docs/schematics/_transparent.graffle/data.plist diff --git a/mitmproxy/docs/schematics/_transparent.graffle/image3.icns b/docs/schematics/_transparent.graffle/image3.icns similarity index 100% rename from mitmproxy/docs/schematics/_transparent.graffle/image3.icns rename to docs/schematics/_transparent.graffle/image3.icns diff --git a/mitmproxy/docs/schematics/_transparent.graffle/image6.tiff b/docs/schematics/_transparent.graffle/image6.tiff similarity index 100% rename from mitmproxy/docs/schematics/_transparent.graffle/image6.tiff rename to docs/schematics/_transparent.graffle/image6.tiff diff --git a/mitmproxy/docs/schematics/_transparent_https.graffle/data.plist b/docs/schematics/_transparent_https.graffle/data.plist similarity index 100% rename from mitmproxy/docs/schematics/_transparent_https.graffle/data.plist rename to docs/schematics/_transparent_https.graffle/data.plist diff --git a/mitmproxy/docs/schematics/_transparent_https.graffle/image3.icns b/docs/schematics/_transparent_https.graffle/image3.icns similarity index 100% rename from mitmproxy/docs/schematics/_transparent_https.graffle/image3.icns rename to docs/schematics/_transparent_https.graffle/image3.icns diff --git a/mitmproxy/docs/schematics/_transparent_https.graffle/image6.tiff b/docs/schematics/_transparent_https.graffle/image6.tiff similarity index 100% rename from mitmproxy/docs/schematics/_transparent_https.graffle/image6.tiff rename to docs/schematics/_transparent_https.graffle/image6.tiff diff --git a/mitmproxy/docs/schematics/architecture.pdf b/docs/schematics/architecture.pdf similarity index 100% rename from mitmproxy/docs/schematics/architecture.pdf rename to docs/schematics/architecture.pdf diff --git a/mitmproxy/docs/schematics/architecture.png b/docs/schematics/architecture.png similarity index 100% rename from mitmproxy/docs/schematics/architecture.png rename to docs/schematics/architecture.png diff --git a/mitmproxy/docs/schematics/architecture.vsdx b/docs/schematics/architecture.vsdx similarity index 100% rename from mitmproxy/docs/schematics/architecture.vsdx rename to docs/schematics/architecture.vsdx diff --git a/mitmproxy/docs/schematics/how-mitmproxy-works-explicit-https.png b/docs/schematics/how-mitmproxy-works-explicit-https.png similarity index 100% rename from mitmproxy/docs/schematics/how-mitmproxy-works-explicit-https.png rename to docs/schematics/how-mitmproxy-works-explicit-https.png diff --git a/mitmproxy/docs/schematics/how-mitmproxy-works-explicit.png b/docs/schematics/how-mitmproxy-works-explicit.png similarity index 100% rename from mitmproxy/docs/schematics/how-mitmproxy-works-explicit.png rename to docs/schematics/how-mitmproxy-works-explicit.png diff --git a/mitmproxy/docs/schematics/how-mitmproxy-works-transparent-https.png b/docs/schematics/how-mitmproxy-works-transparent-https.png similarity index 100% rename from mitmproxy/docs/schematics/how-mitmproxy-works-transparent-https.png rename to docs/schematics/how-mitmproxy-works-transparent-https.png diff --git a/mitmproxy/docs/schematics/how-mitmproxy-works-transparent.png b/docs/schematics/how-mitmproxy-works-transparent.png similarity index 100% rename from mitmproxy/docs/schematics/how-mitmproxy-works-transparent.png rename to docs/schematics/how-mitmproxy-works-transparent.png diff --git a/mitmproxy/docs/schematics/proxy-modes-flowchart.png b/docs/schematics/proxy-modes-flowchart.png similarity index 100% rename from mitmproxy/docs/schematics/proxy-modes-flowchart.png rename to docs/schematics/proxy-modes-flowchart.png diff --git a/mitmproxy/docs/schematics/proxy-modes-regular.png b/docs/schematics/proxy-modes-regular.png similarity index 100% rename from mitmproxy/docs/schematics/proxy-modes-regular.png rename to docs/schematics/proxy-modes-regular.png diff --git a/mitmproxy/docs/schematics/proxy-modes-reverse.png b/docs/schematics/proxy-modes-reverse.png similarity index 100% rename from mitmproxy/docs/schematics/proxy-modes-reverse.png rename to docs/schematics/proxy-modes-reverse.png diff --git a/mitmproxy/docs/schematics/proxy-modes-transparent-1.png b/docs/schematics/proxy-modes-transparent-1.png similarity index 100% rename from mitmproxy/docs/schematics/proxy-modes-transparent-1.png rename to docs/schematics/proxy-modes-transparent-1.png diff --git a/mitmproxy/docs/schematics/proxy-modes-transparent-2.png b/docs/schematics/proxy-modes-transparent-2.png similarity index 100% rename from mitmproxy/docs/schematics/proxy-modes-transparent-2.png rename to docs/schematics/proxy-modes-transparent-2.png diff --git a/mitmproxy/docs/schematics/proxy-modes-transparent-3.png b/docs/schematics/proxy-modes-transparent-3.png similarity index 100% rename from mitmproxy/docs/schematics/proxy-modes-transparent-3.png rename to docs/schematics/proxy-modes-transparent-3.png diff --git a/mitmproxy/docs/schematics/proxy-modes-transparent-wrong.png b/docs/schematics/proxy-modes-transparent-wrong.png similarity index 100% rename from mitmproxy/docs/schematics/proxy-modes-transparent-wrong.png rename to docs/schematics/proxy-modes-transparent-wrong.png diff --git a/mitmproxy/docs/schematics/proxy-modes-upstream.png b/docs/schematics/proxy-modes-upstream.png similarity index 100% rename from mitmproxy/docs/schematics/proxy-modes-upstream.png rename to docs/schematics/proxy-modes-upstream.png diff --git a/mitmproxy/docs/schematics/proxy-modes.pdf b/docs/schematics/proxy-modes.pdf similarity index 100% rename from mitmproxy/docs/schematics/proxy-modes.pdf rename to docs/schematics/proxy-modes.pdf diff --git a/mitmproxy/docs/schematics/proxy-modes.vsdx b/docs/schematics/proxy-modes.vsdx similarity index 100% rename from mitmproxy/docs/schematics/proxy-modes.vsdx rename to docs/schematics/proxy-modes.vsdx diff --git a/mitmproxy/docs/screenshots/firefox3-import.jpg b/docs/screenshots/firefox3-import.jpg similarity index 100% rename from mitmproxy/docs/screenshots/firefox3-import.jpg rename to docs/screenshots/firefox3-import.jpg diff --git a/mitmproxy/docs/screenshots/firefox3-trust.jpg b/docs/screenshots/firefox3-trust.jpg similarity index 100% rename from mitmproxy/docs/screenshots/firefox3-trust.jpg rename to docs/screenshots/firefox3-trust.jpg diff --git a/mitmproxy/docs/screenshots/firefox3.jpg b/docs/screenshots/firefox3.jpg similarity index 100% rename from mitmproxy/docs/screenshots/firefox3.jpg rename to docs/screenshots/firefox3.jpg diff --git a/mitmproxy/docs/screenshots/ios-gateway.png b/docs/screenshots/ios-gateway.png similarity index 100% rename from mitmproxy/docs/screenshots/ios-gateway.png rename to docs/screenshots/ios-gateway.png diff --git a/mitmproxy/docs/screenshots/ios-installed.png b/docs/screenshots/ios-installed.png similarity index 100% rename from mitmproxy/docs/screenshots/ios-installed.png rename to docs/screenshots/ios-installed.png diff --git a/mitmproxy/docs/screenshots/ios-manual.png b/docs/screenshots/ios-manual.png similarity index 100% rename from mitmproxy/docs/screenshots/ios-manual.png rename to docs/screenshots/ios-manual.png diff --git a/mitmproxy/docs/screenshots/ios-profile.png b/docs/screenshots/ios-profile.png similarity index 100% rename from mitmproxy/docs/screenshots/ios-profile.png rename to docs/screenshots/ios-profile.png diff --git a/mitmproxy/docs/screenshots/ios-reverse.png b/docs/screenshots/ios-reverse.png similarity index 100% rename from mitmproxy/docs/screenshots/ios-reverse.png rename to docs/screenshots/ios-reverse.png diff --git a/mitmproxy/docs/screenshots/ios-warning.png b/docs/screenshots/ios-warning.png similarity index 100% rename from mitmproxy/docs/screenshots/ios-warning.png rename to docs/screenshots/ios-warning.png diff --git a/mitmproxy/docs/screenshots/mitmproxy-flowview.png b/docs/screenshots/mitmproxy-flowview.png similarity index 100% rename from mitmproxy/docs/screenshots/mitmproxy-flowview.png rename to docs/screenshots/mitmproxy-flowview.png diff --git a/mitmproxy/docs/screenshots/mitmproxy-intercept-filt.png b/docs/screenshots/mitmproxy-intercept-filt.png similarity index 100% rename from mitmproxy/docs/screenshots/mitmproxy-intercept-filt.png rename to docs/screenshots/mitmproxy-intercept-filt.png diff --git a/mitmproxy/docs/screenshots/mitmproxy-intercept-mid.png b/docs/screenshots/mitmproxy-intercept-mid.png similarity index 100% rename from mitmproxy/docs/screenshots/mitmproxy-intercept-mid.png rename to docs/screenshots/mitmproxy-intercept-mid.png diff --git a/mitmproxy/docs/screenshots/mitmproxy-intercept-options.png b/docs/screenshots/mitmproxy-intercept-options.png similarity index 100% rename from mitmproxy/docs/screenshots/mitmproxy-intercept-options.png rename to docs/screenshots/mitmproxy-intercept-options.png diff --git a/mitmproxy/docs/screenshots/mitmproxy-intercept-result.png b/docs/screenshots/mitmproxy-intercept-result.png similarity index 100% rename from mitmproxy/docs/screenshots/mitmproxy-intercept-result.png rename to docs/screenshots/mitmproxy-intercept-result.png diff --git a/mitmproxy/docs/screenshots/mitmproxy-kveditor-editmode.png b/docs/screenshots/mitmproxy-kveditor-editmode.png similarity index 100% rename from mitmproxy/docs/screenshots/mitmproxy-kveditor-editmode.png rename to docs/screenshots/mitmproxy-kveditor-editmode.png diff --git a/mitmproxy/docs/screenshots/mitmproxy-kveditor.png b/docs/screenshots/mitmproxy-kveditor.png similarity index 100% rename from mitmproxy/docs/screenshots/mitmproxy-kveditor.png rename to docs/screenshots/mitmproxy-kveditor.png diff --git a/mitmproxy/docs/screenshots/mitmproxy.png b/docs/screenshots/mitmproxy.png similarity index 100% rename from mitmproxy/docs/screenshots/mitmproxy.png rename to docs/screenshots/mitmproxy.png diff --git a/mitmproxy/docs/screenshots/osx-addcert-alwaystrust.png b/docs/screenshots/osx-addcert-alwaystrust.png similarity index 100% rename from mitmproxy/docs/screenshots/osx-addcert-alwaystrust.png rename to docs/screenshots/osx-addcert-alwaystrust.png diff --git a/mitmproxy/docs/screenshots/win7-certstore-trustedroot.png b/docs/screenshots/win7-certstore-trustedroot.png similarity index 100% rename from mitmproxy/docs/screenshots/win7-certstore-trustedroot.png rename to docs/screenshots/win7-certstore-trustedroot.png diff --git a/mitmproxy/docs/screenshots/win7-certstore.png b/docs/screenshots/win7-certstore.png similarity index 100% rename from mitmproxy/docs/screenshots/win7-certstore.png rename to docs/screenshots/win7-certstore.png diff --git a/mitmproxy/docs/screenshots/win7-wizard.png b/docs/screenshots/win7-wizard.png similarity index 100% rename from mitmproxy/docs/screenshots/win7-wizard.png rename to docs/screenshots/win7-wizard.png diff --git a/mitmproxy/docs/screenshots/winpythoninstaller.jpg b/docs/screenshots/winpythoninstaller.jpg similarity index 100% rename from mitmproxy/docs/screenshots/winpythoninstaller.jpg rename to docs/screenshots/winpythoninstaller.jpg diff --git a/mitmproxy/docs/scripting/inlinescripts.rst b/docs/scripting/inlinescripts.rst similarity index 100% rename from mitmproxy/docs/scripting/inlinescripts.rst rename to docs/scripting/inlinescripts.rst diff --git a/mitmproxy/docs/scripting/mitmproxy.rst b/docs/scripting/mitmproxy.rst similarity index 100% rename from mitmproxy/docs/scripting/mitmproxy.rst rename to docs/scripting/mitmproxy.rst diff --git a/mitmproxy/docs/transparent.rst b/docs/transparent.rst similarity index 100% rename from mitmproxy/docs/transparent.rst rename to docs/transparent.rst diff --git a/mitmproxy/docs/transparent/linux.rst b/docs/transparent/linux.rst similarity index 100% rename from mitmproxy/docs/transparent/linux.rst rename to docs/transparent/linux.rst diff --git a/mitmproxy/docs/transparent/osx.rst b/docs/transparent/osx.rst similarity index 100% rename from mitmproxy/docs/transparent/osx.rst rename to docs/transparent/osx.rst diff --git a/mitmproxy/docs/tutorials/30second.rst b/docs/tutorials/30second.rst similarity index 100% rename from mitmproxy/docs/tutorials/30second.rst rename to docs/tutorials/30second.rst diff --git a/mitmproxy/docs/tutorials/gamecenter.rst b/docs/tutorials/gamecenter.rst similarity index 100% rename from mitmproxy/docs/tutorials/gamecenter.rst rename to docs/tutorials/gamecenter.rst diff --git a/mitmproxy/docs/tutorials/leaderboard.png b/docs/tutorials/leaderboard.png similarity index 100% rename from mitmproxy/docs/tutorials/leaderboard.png rename to docs/tutorials/leaderboard.png diff --git a/mitmproxy/docs/tutorials/one.png b/docs/tutorials/one.png similarity index 100% rename from mitmproxy/docs/tutorials/one.png rename to docs/tutorials/one.png diff --git a/mitmproxy/docs/tutorials/supermega.png b/docs/tutorials/supermega.png similarity index 100% rename from mitmproxy/docs/tutorials/supermega.png rename to docs/tutorials/supermega.png diff --git a/mitmproxy/docs/tutorials/transparent-dhcp.rst b/docs/tutorials/transparent-dhcp.rst similarity index 100% rename from mitmproxy/docs/tutorials/transparent-dhcp.rst rename to docs/tutorials/transparent-dhcp.rst diff --git a/mitmproxy/docs/tutorials/transparent-dhcp/step1_proxy.png b/docs/tutorials/transparent-dhcp/step1_proxy.png similarity index 100% rename from mitmproxy/docs/tutorials/transparent-dhcp/step1_proxy.png rename to docs/tutorials/transparent-dhcp/step1_proxy.png diff --git a/mitmproxy/docs/tutorials/transparent-dhcp/step1_vbox_eth0.png b/docs/tutorials/transparent-dhcp/step1_vbox_eth0.png similarity index 100% rename from mitmproxy/docs/tutorials/transparent-dhcp/step1_vbox_eth0.png rename to docs/tutorials/transparent-dhcp/step1_vbox_eth0.png diff --git a/mitmproxy/docs/tutorials/transparent-dhcp/step1_vbox_eth1.png b/docs/tutorials/transparent-dhcp/step1_vbox_eth1.png similarity index 100% rename from mitmproxy/docs/tutorials/transparent-dhcp/step1_vbox_eth1.png rename to docs/tutorials/transparent-dhcp/step1_vbox_eth1.png diff --git a/mitmproxy/docs/tutorials/transparent-dhcp/step2_proxied_vm.png b/docs/tutorials/transparent-dhcp/step2_proxied_vm.png similarity index 100% rename from mitmproxy/docs/tutorials/transparent-dhcp/step2_proxied_vm.png rename to docs/tutorials/transparent-dhcp/step2_proxied_vm.png diff --git a/mitmproxy/examples/README b/examples/README similarity index 100% rename from mitmproxy/examples/README rename to examples/README diff --git a/mitmproxy/examples/add_header.py b/examples/add_header.py similarity index 100% rename from mitmproxy/examples/add_header.py rename to examples/add_header.py diff --git a/mitmproxy/examples/change_upstream_proxy.py b/examples/change_upstream_proxy.py similarity index 100% rename from mitmproxy/examples/change_upstream_proxy.py rename to examples/change_upstream_proxy.py diff --git a/mitmproxy/examples/custom_contentviews.py b/examples/custom_contentviews.py similarity index 100% rename from mitmproxy/examples/custom_contentviews.py rename to examples/custom_contentviews.py diff --git a/mitmproxy/examples/dns_spoofing.py b/examples/dns_spoofing.py similarity index 100% rename from mitmproxy/examples/dns_spoofing.py rename to examples/dns_spoofing.py diff --git a/mitmproxy/examples/dup_and_replay.py b/examples/dup_and_replay.py similarity index 100% rename from mitmproxy/examples/dup_and_replay.py rename to examples/dup_and_replay.py diff --git a/mitmproxy/examples/filt.py b/examples/filt.py similarity index 100% rename from mitmproxy/examples/filt.py rename to examples/filt.py diff --git a/mitmproxy/examples/flowbasic b/examples/flowbasic similarity index 100% rename from mitmproxy/examples/flowbasic rename to examples/flowbasic diff --git a/mitmproxy/examples/flowwriter.py b/examples/flowwriter.py similarity index 100% rename from mitmproxy/examples/flowwriter.py rename to examples/flowwriter.py diff --git a/mitmproxy/examples/har_extractor.py b/examples/har_extractor.py similarity index 100% rename from mitmproxy/examples/har_extractor.py rename to examples/har_extractor.py diff --git a/mitmproxy/examples/iframe_injector.py b/examples/iframe_injector.py similarity index 100% rename from mitmproxy/examples/iframe_injector.py rename to examples/iframe_injector.py diff --git a/mitmproxy/examples/mitmproxywrapper.py b/examples/mitmproxywrapper.py similarity index 100% rename from mitmproxy/examples/mitmproxywrapper.py rename to examples/mitmproxywrapper.py diff --git a/mitmproxy/examples/modify_form.py b/examples/modify_form.py similarity index 100% rename from mitmproxy/examples/modify_form.py rename to examples/modify_form.py diff --git a/mitmproxy/examples/modify_querystring.py b/examples/modify_querystring.py similarity index 100% rename from mitmproxy/examples/modify_querystring.py rename to examples/modify_querystring.py diff --git a/mitmproxy/examples/modify_response_body.py b/examples/modify_response_body.py similarity index 100% rename from mitmproxy/examples/modify_response_body.py rename to examples/modify_response_body.py diff --git a/mitmproxy/examples/nonblocking.py b/examples/nonblocking.py similarity index 100% rename from mitmproxy/examples/nonblocking.py rename to examples/nonblocking.py diff --git a/mitmproxy/examples/proxapp.py b/examples/proxapp.py similarity index 100% rename from mitmproxy/examples/proxapp.py rename to examples/proxapp.py diff --git a/mitmproxy/examples/read_dumpfile b/examples/read_dumpfile similarity index 100% rename from mitmproxy/examples/read_dumpfile rename to examples/read_dumpfile diff --git a/mitmproxy/examples/redirect_requests.py b/examples/redirect_requests.py similarity index 100% rename from mitmproxy/examples/redirect_requests.py rename to examples/redirect_requests.py diff --git a/mitmproxy/examples/sslstrip.py b/examples/sslstrip.py similarity index 100% rename from mitmproxy/examples/sslstrip.py rename to examples/sslstrip.py diff --git a/mitmproxy/examples/stickycookies b/examples/stickycookies similarity index 100% rename from mitmproxy/examples/stickycookies rename to examples/stickycookies diff --git a/mitmproxy/examples/stream.py b/examples/stream.py similarity index 100% rename from mitmproxy/examples/stream.py rename to examples/stream.py diff --git a/mitmproxy/examples/stream_modify.py b/examples/stream_modify.py similarity index 100% rename from mitmproxy/examples/stream_modify.py rename to examples/stream_modify.py diff --git a/mitmproxy/examples/stub.py b/examples/stub.py similarity index 100% rename from mitmproxy/examples/stub.py rename to examples/stub.py diff --git a/mitmproxy/examples/tcp_message.py b/examples/tcp_message.py similarity index 100% rename from mitmproxy/examples/tcp_message.py rename to examples/tcp_message.py diff --git a/mitmproxy/examples/tls_passthrough.py b/examples/tls_passthrough.py similarity index 100% rename from mitmproxy/examples/tls_passthrough.py rename to examples/tls_passthrough.py diff --git a/mitmproxy/examples/upsidedownternet.py b/examples/upsidedownternet.py similarity index 100% rename from mitmproxy/examples/upsidedownternet.py rename to examples/upsidedownternet.py diff --git a/test/mitmproxy/test_examples.py b/test/mitmproxy/test_examples.py index 6920c8e90..54e6e753c 100644 --- a/test/mitmproxy/test_examples.py +++ b/test/mitmproxy/test_examples.py @@ -5,7 +5,7 @@ from . import tservers def test_load_scripts(): - example_dir = utils.Data("mitmproxy").path("../examples") + example_dir = utils.Data("mitmproxy").path("../../examples") scripts = glob.glob("%s/*.py" % example_dir) tmaster = tservers.TestMaster(config.ProxyConfig()) From 14f6bcd86e78365a72bd18dcf619d9eefcb914f0 Mon Sep 17 00:00:00 2001 From: Aldo Cortesi Date: Thu, 18 Feb 2016 09:48:37 +1300 Subject: [PATCH 07/10] Adjust release for new repo structure --- release/.env | 6 ------ release/.gitignore | 7 ------- release/mitmdump.spec | 2 +- release/mitmproxy.spec | 2 +- release/mitmweb.spec | 2 +- release/pathoc.spec | 2 +- release/pathod.spec | 4 ++-- release/rtool.py | 2 +- 8 files changed, 7 insertions(+), 20 deletions(-) delete mode 100644 release/.env mode change 100644 => 100755 release/rtool.py diff --git a/release/.env b/release/.env deleted file mode 100644 index 69ac3f052..000000000 --- a/release/.env +++ /dev/null @@ -1,6 +0,0 @@ -DIR="$( dirname "${BASH_SOURCE[0]}" )" -ACTIVATE_DIR="$(if [ -f "$DIR/../venv.mitmproxy/bin/activate" ]; then echo 'bin'; else echo 'Scripts'; fi;)" -if [ -z "$VIRTUAL_ENV" ] && [ -f "$DIR/../venv.mitmproxy/$ACTIVATE_DIR/activate" ]; then - echo "Activating mitmproxy virtualenv..." - source "$DIR/../venv.mitmproxy/$ACTIVATE_DIR/activate" -fi diff --git a/release/.gitignore b/release/.gitignore index c062fb3b2..2247d5f95 100644 --- a/release/.gitignore +++ b/release/.gitignore @@ -1,9 +1,2 @@ -.DS_Store -MANIFEST -*.py[cdo] -*.swp -*.swo - /build /dist -/mitmproxy_rtool.egg-info \ No newline at end of file diff --git a/release/mitmdump.spec b/release/mitmdump.spec index 967f5e585..2e1640839 100644 --- a/release/mitmdump.spec +++ b/release/mitmdump.spec @@ -2,7 +2,7 @@ from PyInstaller.utils.hooks import collect_data_files -a = Analysis(['../mitmproxy/mitmdump'], +a = Analysis(['../mitmproxy/bin/mitmdump'], binaries=None, datas=collect_data_files("mitmproxy.onboarding"), hiddenimports=[], diff --git a/release/mitmproxy.spec b/release/mitmproxy.spec index 6356b0a6d..ff42b1f33 100644 --- a/release/mitmproxy.spec +++ b/release/mitmproxy.spec @@ -2,7 +2,7 @@ from PyInstaller.utils.hooks import collect_data_files -a = Analysis(['../mitmproxy/mitmproxy'], +a = Analysis(['../mitmproxy/bin/mitmproxy'], binaries=None, datas=collect_data_files("mitmproxy.onboarding"), hiddenimports=[], diff --git a/release/mitmweb.spec b/release/mitmweb.spec index e3e634fad..e64940c49 100644 --- a/release/mitmweb.spec +++ b/release/mitmweb.spec @@ -2,7 +2,7 @@ from PyInstaller.utils.hooks import collect_data_files -a = Analysis(['../mitmproxy/mitmweb'], +a = Analysis(['../mitmproxy/bin/mitmweb'], binaries=None, datas=collect_data_files("mitmproxy"), hiddenimports=[], diff --git a/release/pathoc.spec b/release/pathoc.spec index 707d21de2..e694794ee 100644 --- a/release/pathoc.spec +++ b/release/pathoc.spec @@ -2,7 +2,7 @@ from PyInstaller.utils.hooks import collect_data_files -a = Analysis(['../pathod/pathoc'], +a = Analysis(['../pathod/bin/pathoc'], binaries=None, datas=None, hiddenimports=['_cffi_backend'], diff --git a/release/pathod.spec b/release/pathod.spec index 4e515ac98..a0ccbaf0a 100644 --- a/release/pathod.spec +++ b/release/pathod.spec @@ -2,9 +2,9 @@ from PyInstaller.utils.hooks import collect_data_files -a = Analysis(['../pathod/pathod'], +a = Analysis(['../pathod/bin/pathod'], binaries=None, - datas=collect_data_files("libpathod"), + datas=collect_data_files("pathod"), hiddenimports=['_cffi_backend'], hookspath=None, runtime_hooks=None, diff --git a/release/rtool.py b/release/rtool.py old mode 100644 new mode 100755 index 936e64c81..5d411b354 --- a/release/rtool.py +++ b/release/rtool.py @@ -250,7 +250,7 @@ def bdist(ctx, use_existing_wheels, pyinstaller_version): "--clean", "--workpath", PYINSTALLER_TEMP, "--distpath", PYINSTALLER_DIST, - # This is PyInstaller, so setting a + # This is PyInstaller, so setting a # different log level obviously breaks it :-) # "--log-level", "WARN", spec From 36e070ee25ab09ecb9b38dd7f2c5cd8de0073c10 Mon Sep 17 00:00:00 2001 From: Aldo Cortesi Date: Thu, 18 Feb 2016 10:15:59 +1300 Subject: [PATCH 08/10] Pull bin to the top, move pathod examples to examples dir --- {mitmproxy/bin => bin}/mitmdump | 0 {mitmproxy/bin => bin}/mitmproxy | 0 {mitmproxy/bin => bin}/mitmweb | 0 {pathod/bin => bin}/pathoc | 0 {pathod/bin => bin}/pathod | 0 {pathod/examples => examples/pathod}/libpathod_pathoc.py | 0 {pathod/examples => examples/pathod}/test_context.py | 0 {pathod/examples => examples/pathod}/test_setup.py | 0 {pathod/examples => examples/pathod}/test_setupall.py | 0 release/mitmdump.spec | 2 +- release/mitmproxy.spec | 2 +- release/mitmweb.spec | 2 +- release/pathoc.spec | 2 +- release/pathod.spec | 2 +- 14 files changed, 5 insertions(+), 5 deletions(-) rename {mitmproxy/bin => bin}/mitmdump (100%) rename {mitmproxy/bin => bin}/mitmproxy (100%) rename {mitmproxy/bin => bin}/mitmweb (100%) rename {pathod/bin => bin}/pathoc (100%) rename {pathod/bin => bin}/pathod (100%) rename {pathod/examples => examples/pathod}/libpathod_pathoc.py (100%) rename {pathod/examples => examples/pathod}/test_context.py (100%) rename {pathod/examples => examples/pathod}/test_setup.py (100%) rename {pathod/examples => examples/pathod}/test_setupall.py (100%) diff --git a/mitmproxy/bin/mitmdump b/bin/mitmdump similarity index 100% rename from mitmproxy/bin/mitmdump rename to bin/mitmdump diff --git a/mitmproxy/bin/mitmproxy b/bin/mitmproxy similarity index 100% rename from mitmproxy/bin/mitmproxy rename to bin/mitmproxy diff --git a/mitmproxy/bin/mitmweb b/bin/mitmweb similarity index 100% rename from mitmproxy/bin/mitmweb rename to bin/mitmweb diff --git a/pathod/bin/pathoc b/bin/pathoc similarity index 100% rename from pathod/bin/pathoc rename to bin/pathoc diff --git a/pathod/bin/pathod b/bin/pathod similarity index 100% rename from pathod/bin/pathod rename to bin/pathod diff --git a/pathod/examples/libpathod_pathoc.py b/examples/pathod/libpathod_pathoc.py similarity index 100% rename from pathod/examples/libpathod_pathoc.py rename to examples/pathod/libpathod_pathoc.py diff --git a/pathod/examples/test_context.py b/examples/pathod/test_context.py similarity index 100% rename from pathod/examples/test_context.py rename to examples/pathod/test_context.py diff --git a/pathod/examples/test_setup.py b/examples/pathod/test_setup.py similarity index 100% rename from pathod/examples/test_setup.py rename to examples/pathod/test_setup.py diff --git a/pathod/examples/test_setupall.py b/examples/pathod/test_setupall.py similarity index 100% rename from pathod/examples/test_setupall.py rename to examples/pathod/test_setupall.py diff --git a/release/mitmdump.spec b/release/mitmdump.spec index 2e1640839..034d6fcc4 100644 --- a/release/mitmdump.spec +++ b/release/mitmdump.spec @@ -2,7 +2,7 @@ from PyInstaller.utils.hooks import collect_data_files -a = Analysis(['../mitmproxy/bin/mitmdump'], +a = Analysis(['../bin/mitmdump'], binaries=None, datas=collect_data_files("mitmproxy.onboarding"), hiddenimports=[], diff --git a/release/mitmproxy.spec b/release/mitmproxy.spec index ff42b1f33..08e71f738 100644 --- a/release/mitmproxy.spec +++ b/release/mitmproxy.spec @@ -2,7 +2,7 @@ from PyInstaller.utils.hooks import collect_data_files -a = Analysis(['../mitmproxy/bin/mitmproxy'], +a = Analysis(['../bin/mitmproxy'], binaries=None, datas=collect_data_files("mitmproxy.onboarding"), hiddenimports=[], diff --git a/release/mitmweb.spec b/release/mitmweb.spec index e64940c49..257d3e334 100644 --- a/release/mitmweb.spec +++ b/release/mitmweb.spec @@ -2,7 +2,7 @@ from PyInstaller.utils.hooks import collect_data_files -a = Analysis(['../mitmproxy/bin/mitmweb'], +a = Analysis(['../bin/mitmweb'], binaries=None, datas=collect_data_files("mitmproxy"), hiddenimports=[], diff --git a/release/pathoc.spec b/release/pathoc.spec index e694794ee..69c96727b 100644 --- a/release/pathoc.spec +++ b/release/pathoc.spec @@ -2,7 +2,7 @@ from PyInstaller.utils.hooks import collect_data_files -a = Analysis(['../pathod/bin/pathoc'], +a = Analysis(['../bin/pathoc'], binaries=None, datas=None, hiddenimports=['_cffi_backend'], diff --git a/release/pathod.spec b/release/pathod.spec index a0ccbaf0a..6eabad5ee 100644 --- a/release/pathod.spec +++ b/release/pathod.spec @@ -2,7 +2,7 @@ from PyInstaller.utils.hooks import collect_data_files -a = Analysis(['../pathod/bin/pathod'], +a = Analysis(['../bin/pathod'], binaries=None, datas=collect_data_files("pathod"), hiddenimports=['_cffi_backend'], From 33438827379680546089c2694d424f6bfea083c9 Mon Sep 17 00:00:00 2001 From: Thiago Arrais Date: Wed, 17 Feb 2016 18:33:07 -0300 Subject: [PATCH 09/10] Fix help 'P' can also be used on the request screen! --- mitmproxy/mitmproxy/console/flowview.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mitmproxy/mitmproxy/console/flowview.py b/mitmproxy/mitmproxy/console/flowview.py index f490732e4..f74ab1405 100644 --- a/mitmproxy/mitmproxy/console/flowview.py +++ b/mitmproxy/mitmproxy/console/flowview.py @@ -69,7 +69,7 @@ def _mkhelp(): ), ("M", "change default body display mode"), ("p", "previous flow"), - ("P", "copy response(content/headers) to clipboard"), + ("P", "copy request/response (content/headers) to clipboard"), ("r", "replay request"), ("V", "revert changes to request"), ("v", "view body in external viewer"), From b6e5e50c24c735a38705408b164f0b239db509cf Mon Sep 17 00:00:00 2001 From: Aldo Cortesi Date: Thu, 18 Feb 2016 10:40:16 +1300 Subject: [PATCH 10/10] Make fuzzing run again --- test/mitmproxy/fuzzing/.env | 10 ++++------ test/mitmproxy/fuzzing/straight_stream_patterns | 1 - 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/test/mitmproxy/fuzzing/.env b/test/mitmproxy/fuzzing/.env index 82ae6a8d2..8923b8aea 100644 --- a/test/mitmproxy/fuzzing/.env +++ b/test/mitmproxy/fuzzing/.env @@ -1,6 +1,4 @@ - -MITMDUMP=../../mitmdump -PATHOD=../../../pathod/pathod -PATHOC=../../../pathod/pathoc -FUZZ_SETTINGS=-remTt 1 -n 0 - +MITMDUMP=mitmdump +PATHOD=pathod +PATHOC=pathoc +FUZZ_SETTINGS="-remTt 1 -n 0" diff --git a/test/mitmproxy/fuzzing/straight_stream_patterns b/test/mitmproxy/fuzzing/straight_stream_patterns index 93a066e6e..235f2cc33 100644 --- a/test/mitmproxy/fuzzing/straight_stream_patterns +++ b/test/mitmproxy/fuzzing/straight_stream_patterns @@ -9,7 +9,6 @@ get:'http://localhost:9999/p/':s'200:b"foo":ir,"\n"' get:'http://localhost:9999/p/':s'200:b"foo":ir,"a"' get:'http://localhost:9999/p/':s'200:b"foo":ir,"9"' get:'http://localhost:9999/p/':s'200:b"foo":ir,":"' -get:'http://localhost:9999/p/':s"200:b'foo':ir,'\"'" get:'http://localhost:9999/p/':s'200:b"foo":ir,"-"' get:'http://localhost:9999/p/':s'200:b"foo":dr'