mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-22 15:37:45 +00:00
docs: remove option directive
inserting " .. option::" tags create ugly markup, so we just ditch this entirely and continue using refs.
This commit is contained in:
parent
9a1cc16643
commit
83f8522981
@ -62,7 +62,7 @@ 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 :option:`--help` option on each of the tools. Be
|
||||
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.
|
||||
|
||||
@ -72,7 +72,7 @@ Examples
|
||||
common.conf
|
||||
^^^^^^^^^^^
|
||||
|
||||
Note that :option:`--port` is an option supported by all tools.
|
||||
Note that ``--port`` is an option supported by all tools.
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
Anticache
|
||||
=========
|
||||
When the :option:`--anticache` option is passed to mitmproxy, it removes headers
|
||||
When the ``--anticache`` option is passed to mitmproxy, it removes headers
|
||||
(``if-none-match`` and ``if-modified-since``) that might elicit a
|
||||
``304 not modified`` response from the server. This is useful when you want to make
|
||||
sure you capture an HTTP exchange in its totality. It's also often used during
|
||||
@ -10,6 +10,6 @@ sure you capture an HTTP exchange in its totality. It's also often used during
|
||||
|
||||
|
||||
================== ======================
|
||||
command-line :option:`--anticache`
|
||||
command-line ``--anticache``
|
||||
mitmproxy shortcut :kbd:`o` then :kbd:`a`
|
||||
================== ======================
|
||||
|
@ -12,7 +12,7 @@ conversation, where requests may have been made concurrently.
|
||||
You may want to use client-side replay in conjunction with the
|
||||
:ref:`anticache` option, to make sure the server responds with complete data.
|
||||
|
||||
================== =================
|
||||
command-line :option:`-c path`
|
||||
================== ===========
|
||||
command-line ``-c path``
|
||||
mitmproxy shortcut :kbd:`c`
|
||||
================== =================
|
||||
================== ===========
|
||||
|
@ -20,10 +20,10 @@ take a look at the :ref:`responsestreaming` feature.
|
||||
How it works
|
||||
------------
|
||||
|
||||
================== =============================
|
||||
command-line :option:`--ignore regex`
|
||||
================== ======================
|
||||
command-line ``--ignore regex``
|
||||
mitmproxy shortcut :kbd:`o` then :kbd:`I`
|
||||
================== =============================
|
||||
================== ======================
|
||||
|
||||
|
||||
mitmproxy allows you to specify a regex which is matched against a ``host:port`` string
|
||||
@ -32,7 +32,7 @@ mitmproxy allows you to specify a regex which is matched against a ``host:port``
|
||||
There are two important quirks to consider:
|
||||
|
||||
- **In transparent mode, the ignore pattern is matched against the IP and ClientHello SNI host.** While we usually infer the
|
||||
hostname from the Host header if the :option:`--host` argument is passed to mitmproxy, we do not
|
||||
hostname from the Host header if the ``--host`` argument is passed to mitmproxy, we do not
|
||||
have access to this information before the SSL handshake. If the client uses SNI however, then we treat the SNI host as an ignore target.
|
||||
- In regular mode, explicit HTTP requests are never ignored. [#explicithttp]_ The ignore pattern is
|
||||
applied on CONNECT requests, which initiate HTTPS or clear-text WebSocket connections.
|
||||
@ -42,7 +42,7 @@ Tutorial
|
||||
|
||||
If you just want to ignore one specific domain, there's usually a bulletproof method to do so:
|
||||
|
||||
1. Run mitmproxy or mitmdump in verbose mode (:option:`-v`) and observe the ``host:port``
|
||||
1. Run mitmproxy or mitmdump in verbose mode (``-v``) and observe the ``host:port``
|
||||
information in the serverconnect messages. mitmproxy will filter on these.
|
||||
2. Take the ``host:port`` string, surround it with ^ and $, escape all dots (. becomes \\.)
|
||||
and use this as your ignore pattern:
|
||||
|
@ -10,8 +10,8 @@ upstream servers. For now, only HTTP Basic authentication is supported. The
|
||||
proxy auth options are not compatible with the transparent, socks or reverse proxy
|
||||
mode.
|
||||
|
||||
================== =============================
|
||||
command-line :option:`--nonanonymous`,
|
||||
:option:`--singleuser USER`,
|
||||
:option:`--htpasswd PATH`
|
||||
================== =============================
|
||||
================== ======================
|
||||
command-line ``--nonanonymous``,
|
||||
``--singleuser USER``,
|
||||
``--htpasswd PATH``
|
||||
================== ======================
|
||||
|
@ -54,7 +54,7 @@ So, you might start **mitmdump** as follows:
|
||||
|
||||
This will load the replacement text from the file ``~/xss-exploit``.
|
||||
|
||||
Both the :option:`--replace` and :option:`--replace-from-file` flags can be passed multiple
|
||||
Both the ``--replace`` and ``--replace-from-file`` flags can be passed multiple
|
||||
times.
|
||||
|
||||
|
||||
@ -65,8 +65,8 @@ The :kbd:`R` shortcut key in the mitmproxy options menu (:kbd:`o`) lets you add
|
||||
replacement hooks using a built-in editor. The context-sensitive help (:kbd:`?`) has
|
||||
complete usage information.
|
||||
|
||||
================== =============================
|
||||
command-line :option:`--replace`,
|
||||
:option:`--replace-from-file`
|
||||
================== =======================
|
||||
command-line ``--replace``,
|
||||
``--replace-from-file``
|
||||
mitmproxy shortcut :kbd:`o` then :kbd:`R`
|
||||
================== =============================
|
||||
================== =======================
|
||||
|
@ -19,9 +19,9 @@ On the command-line
|
||||
Streaming can be enabled on the command line for all response bodies exceeding a certain size.
|
||||
The SIZE argument understands k/m/g suffixes, e.g. 3m for 3 megabytes.
|
||||
|
||||
================== =============================
|
||||
command-line :option:`--stream SIZE`
|
||||
================== =============================
|
||||
================== =================
|
||||
command-line ``--stream SIZE``
|
||||
================== =================
|
||||
|
||||
.. warning::
|
||||
|
||||
|
@ -7,9 +7,9 @@ In reverse proxy mode, mitmproxy accepts standard HTTP(S) requests and forwards
|
||||
them to the specified upstream server. This is in contrast to :ref:`upstreamproxy`, in which
|
||||
mitmproxy forwards HTTP(S) proxy requests to an upstream proxy server.
|
||||
|
||||
================== =====================================
|
||||
command-line :option:`-R http[s]://hostname[:port]`
|
||||
================== =====================================
|
||||
================== ================================
|
||||
command-line ``-R http[s]://hostname[:port]``
|
||||
================== ================================
|
||||
|
||||
Here, **http[s]** signifies if the proxy should use TLS to connect to the server.
|
||||
mitmproxy always accepts both encrypted and unencrypted requests and transforms
|
||||
|
@ -13,7 +13,7 @@ By default, :program:`mitmproxy` excludes request headers when matching incoming
|
||||
requests with responses from the replay file. This works in most circumstances,
|
||||
and makes it possible to replay server responses in situations where request
|
||||
headers would naturally vary, e.g. using a different user agent.
|
||||
The :option:`--rheader headername` command-line option allows you to override
|
||||
The ``--rheader headername`` command-line option allows you to override
|
||||
this behaviour by specifying individual headers that should be included in matching.
|
||||
|
||||
|
||||
@ -30,10 +30,10 @@ recording. So, if they were in the past at the time of recording, they will be
|
||||
in the past at the time of replay, and vice versa. Cookie expiry times are
|
||||
updated in a similar way.
|
||||
|
||||
You can turn off response refreshing using the :option:`--norefresh` argument, or using
|
||||
You can turn off response refreshing using the ``--norefresh`` argument, or using
|
||||
the :kbd:`o` options shortcut within :program:`mitmproxy`.
|
||||
|
||||
================== =================
|
||||
command-line :option:`-S path`
|
||||
================== ===========
|
||||
command-line ``-S path``
|
||||
mitmproxy shortcut :kbd:`S`
|
||||
================== =================
|
||||
================== ===========
|
||||
|
@ -13,7 +13,7 @@ Example: Set the **Host** header to "example.com" for all requests.
|
||||
|
||||
mitmdump -R http://example.com --setheader :~q:Host:example.com
|
||||
|
||||
================== =============================
|
||||
command-line :option:`--setheader PATTERN`
|
||||
================== =======================
|
||||
command-line ``--setheader PATTERN``
|
||||
mitmproxy shortcut :kbd:`o` then :kbd:`H`
|
||||
================== =============================
|
||||
================== =======================
|
||||
|
@ -5,6 +5,6 @@ SOCKS Mode
|
||||
|
||||
In this mode, mitmproxy acts as a SOCKS5 proxy server.
|
||||
|
||||
================== =================
|
||||
command-line :option:`--socks`
|
||||
================== =================
|
||||
================== ===========
|
||||
command-line ``--socks``
|
||||
================== ===========
|
||||
|
@ -21,7 +21,7 @@ record the authentication process once, and simply replay it on startup every ti
|
||||
to interact with the secured resources.
|
||||
|
||||
================== ======================
|
||||
command-line :option:`-t FILTER`
|
||||
command-line ``-t FILTER``
|
||||
mitmproxy shortcut :kbd:`o` then :kbd:`t`
|
||||
================== ======================
|
||||
|
||||
@ -36,6 +36,6 @@ authentication through the proxy. Note that :program:`mitmproxy` doesn't (yet) s
|
||||
replay of HTTP Digest authentication.
|
||||
|
||||
================== ======================
|
||||
command-line :option:`-u FILTER`
|
||||
command-line ``-u FILTER``
|
||||
mitmproxy shortcut :kbd:`o` then :kbd:`A`
|
||||
================== ======================
|
||||
|
@ -18,7 +18,7 @@ How it works
|
||||
------------
|
||||
|
||||
================== ======================
|
||||
command-line :option:`--tcp HOST`
|
||||
command-line ``--tcp HOST``
|
||||
mitmproxy shortcut :kbd:`o` then :kbd:`T`
|
||||
================== ======================
|
||||
|
||||
|
@ -17,7 +17,7 @@ certs in transparent mode.
|
||||
|
||||
Upstream cert sniffing is on by default, and can optionally be turned off.
|
||||
|
||||
================== =============================
|
||||
command-line :option:`--no-upstream-cert`
|
||||
================== ======================
|
||||
command-line ``--no-upstream-cert``
|
||||
mitmproxy shortcut :kbd:`o` then :kbd:`U`
|
||||
================== =============================
|
||||
================== ======================
|
||||
|
@ -7,6 +7,6 @@ In this mode, mitmproxy accepts proxy requests and unconditionally forwards all
|
||||
requests to a specified upstream proxy server. This is in contrast to :ref:`reverseproxy`,
|
||||
in which mitmproxy forwards ordinary HTTP requests to an upstream server.
|
||||
|
||||
================== ===================================
|
||||
command-line :option:`-U http://hostname[:port]`
|
||||
================== ===================================
|
||||
================== =============================
|
||||
command-line ``-U http://hostname[:port]``
|
||||
================== =============================
|
||||
|
@ -7,7 +7,7 @@ mitmdump
|
||||
|
||||
**mitmdump** is the command-line companion to mitmproxy. It provides
|
||||
tcpdump-like functionality to let you view, record, and programmatically
|
||||
transform HTTP traffic. See the :option:`--help` flag output for complete
|
||||
transform HTTP traffic. See the ``--help`` flag output for complete
|
||||
documentation.
|
||||
|
||||
|
||||
@ -28,7 +28,7 @@ Filtering saved traffic
|
||||
|
||||
>>> mitmdump -nr infile -w outfile "~m post"
|
||||
|
||||
Start mitmdump without binding to the proxy port (:option:`-n`), read all flows from
|
||||
Start mitmdump without binding to the proxy port (``-n``), read all flows from
|
||||
infile, apply the specified filter expression (only match POSTs), and write to
|
||||
outfile.
|
||||
|
||||
@ -38,8 +38,8 @@ Client replay
|
||||
|
||||
>>> mitmdump -nc outfile
|
||||
|
||||
Start mitmdump without binding to the proxy port (:option:`-n`), then replay all
|
||||
requests from outfile (:option:`-c filename`). Flags combine in the obvious way, so
|
||||
Start mitmdump without binding to the proxy port (``-n``), then replay all
|
||||
requests from outfile (``-c filename``). Flags combine in the obvious way, so
|
||||
you can replay requests from one file, and write the resulting flows to
|
||||
another:
|
||||
|
||||
|
@ -35,7 +35,7 @@ achieve transparent mode.
|
||||
|
||||
>>> mitmproxy -T --host
|
||||
|
||||
The :option:`-T` flag turns on transparent mode, and the :option:`--host`
|
||||
The ``-T`` flag turns on transparent mode, and the ``--host``
|
||||
argument tells mitmproxy to use the value of the Host header for URL display.
|
||||
|
||||
6. Finally, configure your test device to use the host on which mitmproxy is
|
||||
|
@ -50,7 +50,7 @@ Note that this means we don't support transparent mode for earlier versions of O
|
||||
|
||||
>>> mitmproxy -T --host
|
||||
|
||||
The :option:`-T` flag turns on transparent mode, and the :option:`--host`
|
||||
The ``-T`` flag turns on transparent mode, and the ``--host``
|
||||
argument tells mitmproxy to use the value of the Host header for URL display.
|
||||
|
||||
8. Finally, configure your test device to use the host on which mitmproxy is
|
||||
|
Loading…
Reference in New Issue
Block a user