From e93b343ac4917979f912afe5a2f0bbc8be0b28d7 Mon Sep 17 00:00:00 2001 From: Aldo Cortesi Date: Tue, 1 Jan 2013 16:35:52 +1300 Subject: [PATCH] Docs and Readme - Don't keep a full duplicate readme just for pypi. Pypi really needs to learn to read markdown. - Style and content adjustments --- README.mkd | 23 ++++++------ README.txt | 83 +++-------------------------------------- doc-src/02-docstyle.css | 5 +++ doc-src/_layout.html | 4 +- doc-src/index.html | 3 ++ doc-src/index.py | 25 +++---------- doc-src/install.html | 2 +- doc-src/intro.html | 4 -- 8 files changed, 33 insertions(+), 116 deletions(-) create mode 100644 doc-src/02-docstyle.css delete mode 100644 doc-src/intro.html diff --git a/README.mkd b/README.mkd index a239eb29f..b7d5f4ee1 100644 --- a/README.mkd +++ b/README.mkd @@ -1,9 +1,9 @@ -__mitmproxy__ is an SSL-capable man-in-the-middle proxy for HTTP. It provides a -console interface that allows traffic flows to be inspected and edited on the -fly. +__mitmproxy__ is an interactive, SSL-capable man-in-the-middle proxy for HTTP +with a console interface. -__mitmdump__ is the command-line version of mitmproxy, with the same -functionality but without the user interface. Think tcpdump for HTTP. +__mitmdump__ is the command-line version of mitmproxy. Think tcpdump for HTTP. + +__libmproxy__ is the library that mitmproxy and mitmdump are built on. Complete documentation and a set of practical tutorials is included in the distribution package, and is also available at @@ -18,14 +18,15 @@ Features - 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. +- Transparent proxy mode on OSX and Linux. - Make scripted changes to HTTP traffic using Python. - SSL certificates for interception are generated on the fly. - +- And much, much more. Download -------- -Releases and rendered documentation can be found on the mitmproxy website: +Releases and documentation can be found on the mitmproxy website: [mitmproxy.org](http://mitmproxy.org) @@ -42,7 +43,7 @@ Come join us in the #mitmproxy channel on the OFTC IRC network We also have a mailing list, hosted here: - http://groups.google.com/group/mitmproxy +[groups.google.com/group/mitmproxy](http://groups.google.com/group/mitmproxy) Requirements @@ -51,17 +52,17 @@ Requirements * [Python](http://www.python.org) 2.7.x. * [PyOpenSSL](http://pypi.python.org/pypi/pyOpenSSL) 0.13 or newer. * [pyasn1](http://pypi.python.org/pypi/pyasn1) 0.1.2 or newer. -* [urwid](http://excess.org/urwid/) version 0.9.8 or newer. +* [urwid](http://excess.org/urwid/) version 1.1 or newer. * [PIL](http://www.pythonware.com/products/pil/) version 1.1 or newer. * [lxml](http://lxml.de/) version 2.3 or newer. -* [netlib](http://pypi.python.org/pypi/netlib) 0.1 or newer. +* [netlib](http://pypi.python.org/pypi/netlib) 0.2.2 or newer. The following auxiliary components may be needed if you plan to hack on mitmproxy: * The test suite uses the [nose](http://readthedocs.org/docs/nose/en/latest/) unit testing framework and requires [human_curl](https://github.com/Lispython/human_curl) and - [pathod](http://pypi.python.org/pypi/pathod). + [pathod](http://pathod.org). * Rendering the documentation requires [countershape](http://github.com/cortesi/countershape). __mitmproxy__ is tested and developed on OSX, Linux and OpenBSD. Windows is not diff --git a/README.txt b/README.txt index ba9b43231..7a86dca01 100644 --- a/README.txt +++ b/README.txt @@ -1,84 +1,11 @@ -**mitmproxy** is an SSL-capable man-in-the-middle proxy for HTTP. It provides a -console interface that allows traffic flows to be inspected and edited on the -fly. +**mitmproxy** is an interactive, SSL-capable man-in-the-middle proxy for HTTP +with a console interface. -**mitmdump** is the command-line version of mitmproxy, with the same -functionality but without the user interface. Think tcpdump for HTTP. +**mitmdump** is the command-line version of mitmproxy. Think tcpdump for HTTP. + +**libmproxy** is the library that mitmproxy and mitmdump are built on. Complete documentation and a set of practical tutorials is included in the distribution package, and is also available at mitmproxy.org_. - -Features --------- - -- Intercept HTTP requests and responses and modify them on the fly. -- 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. -- Make scripted changes to HTTP traffic using Python. -- SSL certificates for interception are generated on the fly. - - -Download --------- - -Releases and rendered documentation can be found on the mitmproxy website: - -mitmproxy.org_ - -Source is hosted on github: - -`github.com/cortesi/mitmproxy`_ - - -Community ---------- - -Come join us in the #mitmproxy channel on the OFTC IRC network -(irc.oftc.net, port 6667). - -We also have a mailing list, hosted here: - -http://groups.google.com/group/mitmproxy - - -Requirements ------------- - -* Python_ 2.7.x. -* PyOpenSSL_ 0.13 or newer. -* pyasn1_ 0.1.2 or newer. -* urwid_ version 0.9.8 or newer. -* PIL_ version 1.1 or newer. -* lxml_ version 2.3 or newer. - -The following auxiliary components may be needed if you plan to hack on -mitmproxy: - -* The test suite uses the nose_ unit testing - framework. -* Rendering the documentation requires countershape_. - -**mitmproxy** is tested and developed on OSX, Linux and OpenBSD. Windows is not -supported at the moment. - -You should also make sure that your console environment is set up with the -following: - -* EDITOR environment variable to determine the external editor. -* PAGER environment variable to determine the external pager. -* Appropriate entries in your mailcap files to determine external - viewers for request and response contents. - .. _mitmproxy.org: http://mitmproxy.org -.. _github.com/cortesi/mitmproxy: http://github.com/cortesi/mitmproxy -.. _python: http://www.python.org -.. _PyOpenSSL: http://pypi.python.org/pypi/pyOpenSSL -.. _pyasn1: http://pypi.python.org/pypi/pyasn1 -.. _PIL: http://www.pythonware.com/products/pil/ -.. _lxml: http://lxml.de/ -.. _urwid: http://excess.org/urwid/ -.. _nose: http://readthedocs.org/docs/nose/en/latest/ -.. _countershape: http://github.com/cortesi/countershape diff --git a/doc-src/02-docstyle.css b/doc-src/02-docstyle.css new file mode 100644 index 000000000..ad2235e7e --- /dev/null +++ b/doc-src/02-docstyle.css @@ -0,0 +1,5 @@ +.terminal { + color: #c0c0c0; + font-size: 1em; + background: #000000; +} diff --git a/doc-src/_layout.html b/doc-src/_layout.html index d2d73249a..826279ef9 100644 --- a/doc-src/_layout.html +++ b/doc-src/_layout.html @@ -17,7 +17,7 @@
-

@!pageTitle!@

+

@!this.title!@

$!body!$
diff --git a/doc-src/index.html b/doc-src/index.html index 8b1378917..79687ec61 100644 --- a/doc-src/index.html +++ b/doc-src/index.html @@ -1 +1,4 @@ +@!index_contents!@ + + diff --git a/doc-src/index.py b/doc-src/index.py index 5b6fcc5ee..9684306b5 100644 --- a/doc-src/index.py +++ b/doc-src/index.py @@ -6,37 +6,24 @@ sys.path.insert(0, "..") from libmproxy import filt MITMPROXY_SRC = "~/git/public/mitmproxy" - -if ns.options.website: - ns.title = countershape.template.Template(None, "

@!this.title!@

") - this.layout = countershape.Layout("_websitelayout.html") -else: - ns.title = countershape.template.Template(None, "

@!this.title!@

") - this.layout = countershape.Layout("_layout.html") - +this.layout = countershape.Layout("_layout.html") +this.titlePrefix = "mitmproxy 0.9 - " this.markup = markup.Markdown() + ns.docMaintainer = "Aldo Cortesi" ns.docMaintainerEmail = "aldo@corte.si" -ns.copyright = u"\u00a9 mitmproxy project, 2012" - -ns.index = countershape.widgets.SiblingPageIndex('/index.html', divclass="pageindex") +ns.copyright = u"\u00a9 mitmproxy project, 2013" def mpath(p): p = os.path.join(MITMPROXY_SRC, p) return os.path.expanduser(p) -ns.license = file(mpath("LICENSE")).read() ns.index_contents = file(mpath("README.mkd")).read() - - -top = os.path.abspath(os.getcwd()) def example(s): d = file(mpath(s)).read() extemp = """
%s
(%s)
""" return extemp%(countershape.template.Syntax("py")(d), s) - - ns.example = example filt_help = [] @@ -73,10 +60,8 @@ def nav(page, current, state): return pre + '%s'%(model.UrlTo(page), p.title) ns.nav = nav - pages = [ - Page("index.html", "docs"), - Page("intro.html", "Introduction"), + Page("index.html", "Introduction"), Page("install.html", "Installation"), Page("mitmproxy.html", "mitmproxy"), Page("mitmdump.html", "mitmdump"), diff --git a/doc-src/install.html b/doc-src/install.html index 0968cd660..6f4bc5305 100644 --- a/doc-src/install.html +++ b/doc-src/install.html @@ -13,7 +13,7 @@ sudo pip install mitmproxy ## From Source - When installing from source, you will need to install the -[dependencies](@!urlTo("intro.html")!@) by hand. +[dependencies](@!urlTo("index.html")!@) by hand. - Then run the following command from the base of the source distribution:
diff --git a/doc-src/intro.html b/doc-src/intro.html
deleted file mode 100644
index 79687ec61..000000000
--- a/doc-src/intro.html
+++ /dev/null
@@ -1,4 +0,0 @@
-
-@!index_contents!@
-
-