diff options
-rw-r--r-- | doc-src/_nav.html | 1 | ||||
-rw-r--r-- | doc-src/config.html | 92 | ||||
-rw-r--r-- | doc-src/index.py | 6 | ||||
-rw-r--r-- | libmproxy/cmdline.py | 3 |
4 files changed, 99 insertions, 3 deletions
diff --git a/doc-src/_nav.html b/doc-src/_nav.html index 0ae0fa67..6c3afbe1 100644 --- a/doc-src/_nav.html +++ b/doc-src/_nav.html @@ -7,6 +7,7 @@ <li class="nav-header">Tools</li> $!nav("mitmproxy.html", this, state)!$ $!nav("mitmdump.html", this, state)!$ + $!nav("config.html", this, state)!$ <li class="nav-header">Features</li> $!nav("anticache.html", this, state)!$ diff --git a/doc-src/config.html b/doc-src/config.html new file mode 100644 index 00000000..60404449 --- /dev/null +++ b/doc-src/config.html @@ -0,0 +1,92 @@ + + +Mitmproxy is configured through a set of files in the users ~/.mitmproxy +directory. + +<table class="table"> + <tbody> + <tr> + <th>mitmproxy.conf</th> + <td>Settings for the <b>mitmproxy</b>. This file can contain any options supported by mitmproxy.</td> + </tr> + <tr> + <th>mitmdump.conf</th> + <td>Settings for the <b>mitmdump</b>. This file can contain any options supported by mitmdump.</td> + </tr> + <tr> + <th>common.conf</th> + + <td>Settings shared between all command-line tools. Settings in + this file are over-ridden by those in the tool-specific + files. Only options shared by mitmproxy and mitmdump should be used in this file. </td> + </tr> + </tbody> +</table> + +# Syntax + +## Comments + +<pre> +# this is a comment +; this is also a comment (.ini style) +--- and this is a comment too (yaml style) +</pre> + +## Key/Value pairs + +- Keys and values are case-sensitive +- Whitespace is ignored +- Lists are comma-delimited, and enclosed in square brackets + +<pre> +name = value # (.ini style) +name: value # (yaml style) +--name value # (command-line option style) + +fruit = [apple, orange, lemon] +indexes = [1, 12, 35 , 40] +</pre> + +## Flags + +These are boolean options that take no value but true/false. + +<pre> +name = true # (.ini style) +name +--name # (command-line option style) +</pre> + +# Options + +The options available in the config files are precisely those available as +command-line flags, with the key being the option's long name. To get a +complete list of these, use the __--help__ option on each of the tools. Be +careful to only specify common options in the __common.conf__ file - +unsupported options in this file will be detected as an error on startup. + +# Examples + +## common.conf + +Note that __port__ is an option supported by all tools. + +<pre class="code"> +port = 8080 +</pre> + + +## mitmproxy.conf + +<pre class="code"> +palette = light +</pre> + + + + + + + + diff --git a/doc-src/index.py b/doc-src/index.py index 9eb0ea2b..f3d3ed3b 100644 --- a/doc-src/index.py +++ b/doc-src/index.py @@ -57,11 +57,13 @@ ns.navbar = countershape.template.File(None, "_nav.html") pages = [ Page("index.html", "Introduction"), Page("install.html", "Installation"), - Page("mitmproxy.html", "mitmproxy"), - Page("mitmdump.html", "mitmdump"), Page("howmitmproxy.html", "How mitmproxy works"), Page("modes.html", "Modes of Operation"), + Page("mitmproxy.html", "mitmproxy"), + Page("mitmdump.html", "mitmdump"), + Page("config.html", "configuration"), + Page("ssl.html", "Overview"), Directory("certinstall"), Directory("scripting"), diff --git a/libmproxy/cmdline.py b/libmproxy/cmdline.py index 054a8059..f5c66caa 100644 --- a/libmproxy/cmdline.py +++ b/libmproxy/cmdline.py @@ -197,7 +197,8 @@ def common_options(parser): parser.add_argument( '--shortversion', action= 'version', - version= version.VERSION + help = "show program's short version number and exit", + version = version.VERSION ) parser.add_argument( "--anticache", |