aboutsummaryrefslogtreecommitdiffstats
path: root/doc-src
diff options
context:
space:
mode:
authorAldo Cortesi <aldo@nullcube.com>2011-02-18 12:40:45 +1300
committerAldo Cortesi <aldo@nullcube.com>2011-02-18 12:40:45 +1300
commitcd4eea39348fc9d59d4f0cc3f71384f7c1c2b2e2 (patch)
treeae09d5a06c1d7f2ae6314fd5f96d6b506f454507 /doc-src
parent7769e5a898150451a52b5683c519ee04802310b8 (diff)
downloadmitmproxy-cd4eea39348fc9d59d4f0cc3f71384f7c1c2b2e2.tar.gz
mitmproxy-cd4eea39348fc9d59d4f0cc3f71384f7c1c2b2e2.tar.bz2
mitmproxy-cd4eea39348fc9d59d4f0cc3f71384f7c1c2b2e2.zip
First pass of script hooks for mitmdump.
Also stub out docs, improve mitmdump error handling.
Diffstat (limited to 'doc-src')
-rw-r--r--doc-src/02-docstyle.css2
-rw-r--r--doc-src/index.py23
-rw-r--r--doc-src/library.html5
-rw-r--r--doc-src/mitmdump.html0
-rw-r--r--doc-src/mitmproxy.html0
-rw-r--r--doc-src/scripts.html11
6 files changed, 31 insertions, 10 deletions
diff --git a/doc-src/02-docstyle.css b/doc-src/02-docstyle.css
index 236bfc52..dd61d2e8 100644
--- a/doc-src/02-docstyle.css
+++ b/doc-src/02-docstyle.css
@@ -2,7 +2,7 @@ body {
-x-system-font:none;
font-family: Helvetica,Arial,Tahoma,Verdana,Sans-Serif;
color: #555555;
- font-size: 1.3em;
+ font-size: 1.1em;
}
a {
diff --git a/doc-src/index.py b/doc-src/index.py
index 1ff22108..c34fcb78 100644
--- a/doc-src/index.py
+++ b/doc-src/index.py
@@ -1,7 +1,7 @@
+import os
import countershape
from countershape import Page, Directory, PythonModule, markup
-import countershape.grok
-
+import countershape.grok, countershape.template
this.layout = countershape.Layout("_layout.html")
ns.docTitle = "mitmproxy"
@@ -16,12 +16,25 @@ ns.sidebar = countershape.widgets.SiblingPageIndex(
)
ns.license = file("../LICENSE").read()
-ns.index_contents = file("../README").read()
-ns.example = file("../examples/stickycookies.py").read()
+ns.index_contents = file("../README.mkd").read()
+
+
+top = os.path.abspath(os.getcwd())
+def example(s):
+ d = file(os.path.join(top, s)).read()
+ return countershape.template.pySyntax(d)
+
+
+ns.example = example
+
+
pages = [
Page("index.html", "introduction"),
- Page("library.html", "library"),
+ Page("mitmproxy.html", "mitmproxy"),
+ Page("mitmdump.html", "mitmdump"),
+ Page("scripts.html", "scripts"),
+ Page("library.html", "libmproxy"),
Page("faq.html", "faq"),
Page("admin.html", "administrivia")
]
diff --git a/doc-src/library.html b/doc-src/library.html
index e8533731..2266c077 100644
--- a/doc-src/library.html
+++ b/doc-src/library.html
@@ -8,8 +8,5 @@ this lets you log in to a site using your browser, and then make subsequent
requests using a tool like __curl__, which will then seem to be part of the
authenticated session.
-
-<!--(block |pySyntax)-->
-$!example!$
-<!--(end)-->
+$!example("../examples/stickycookies.py")!$
diff --git a/doc-src/mitmdump.html b/doc-src/mitmdump.html
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/doc-src/mitmdump.html
diff --git a/doc-src/mitmproxy.html b/doc-src/mitmproxy.html
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/doc-src/mitmproxy.html
diff --git a/doc-src/scripts.html b/doc-src/scripts.html
new file mode 100644
index 00000000..b7085c79
--- /dev/null
+++ b/doc-src/scripts.html
@@ -0,0 +1,11 @@
+
+Both __mitmproxy__ and __mitmdump__ allow you to modify requests and responses
+with external scripts. The script interface is simple - scripts simply read,
+modify and return a single __libmproxy.flow.Flow__ object, using the methods
+defined in the __libmproxy.script__ module. Scripts must be executable.
+
+$!example("../examples/simple_script")!$
+
+
+
+