Administrivia: docs for new config file, minor adjustments

For now, the config file docs basically say "it's YAML, read the source". We
should do better for the next release.
This commit is contained in:
Aldo Cortesi 2016-12-17 10:57:13 +13:00
parent 2fe7cf448d
commit aa90fd359d
3 changed files with 11 additions and 81 deletions

View File

@ -1,4 +1,4 @@
18 December 2017: mitmproxy 1.0 18 December 2016: mitmproxy 1.0
* Mitmproxy is now Python 3 only * Mitmproxy is now Python 3 only
@ -13,6 +13,9 @@
* http2: significant improvements, but is temporarily disabled by default * http2: significant improvements, but is temporarily disabled by default
due to wide-spread protocol implementation errors on some large website due to wide-spread protocol implementation errors on some large website
* websockets: the protocol implementation is now mature, and is enabled by
default. Complete UI support is coming in the next release.
* A myriad of other small improvements throughout the project. * A myriad of other small improvements throughout the project.

View File

@ -3,84 +3,11 @@
Configuration Configuration
============= =============
Mitmproxy is configured through a set of files in the users ~/.mitmproxy Mitmproxy is configured with a YAML_ file, located at
directory. ``~/.mitmproxy/config.yaml``. We'll have complete documentation for all
supported options in the next release in the meantime, please consult the
source_ for a complete list of options and types.
mitmproxy.conf
Settings for the :program:`mitmproxy`. This file can contain any options supported by
mitmproxy.
mitmdump.conf .. _YAML: http://www.yaml.org/start.html
Settings for the :program:`mitmdump`. This file can contain any options supported by mitmdump. .. _source: https://github.com/mitmproxy/mitmproxy/blob/master/mitmproxy/options.py
common.conf
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.
Syntax
------
Comments
^^^^^^^^
.. code-block:: none
# this is a comment
; this is also a comment (.ini style)
--- and this is a comment too (yaml style)
Key/Value pairs
^^^^^^^^^^^^^^^
- Keys and values are case-sensitive
- Whitespace is ignored
- Lists are comma-delimited, and enclosed in square brackets
.. code-block:: none
name = value # (.ini style)
name: value # (yaml style)
--name value # (command-line option style)
fruit = [apple, orange, lemon]
indexes = [1, 12, 35 , 40]
Flags
^^^^^
These are boolean options that take no value but true/false.
.. code-block:: none
name = true # (.ini style)
name
--name # (command-line option style)
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.
.. code-block:: none
port = 8080
mitmproxy.conf
^^^^^^^^^^^^^^
.. code-block:: none
palette = light

View File

@ -1,4 +1,4 @@
IVERSION = (1, 0) IVERSION = (1, 0, 0)
VERSION = ".".join(str(i) for i in IVERSION) VERSION = ".".join(str(i) for i in IVERSION)
PATHOD = "pathod " + VERSION PATHOD = "pathod " + VERSION
MITMPROXY = "mitmproxy " + VERSION MITMPROXY = "mitmproxy " + VERSION