mitmdump 参数

Parameter Type Default Description
add_upstream_certs_to_client_chain bool False Add all certificates of the upstream server to the certificate chain that will be served to the proxy client, as extras.
allow_hosts sequence of str [] Opposite of --ignore-hosts.
anticache bool False Strip out request headers that might cause the server to return 304-not-modified.
anticomp bool False Try to convince servers to send us un-compressed data.
block_global bool True Block connections from globally reachable networks, as defined in the IANA special purpose registries.
block_private bool False Block connections from private networks, as defined in the IANA special purpose registries. This option does not affect loopback addresses.
body_size_limit optional str None Byte size limit of HTTP request and response bodies. Understands k/m/g suffixes, i.e. 3m for 3 megabytes.
certs sequence of str [] SSL certificates of the form "[domain=]path". The domain may include a wildcard, and is equal to "*" if not specified. The file at path is a certificate in PEM format. If a private key is included in the PEM, it is used, else the default key in the conf dir is used. The PEM file should contain the full certificate chain, with the leaf certificate as the first entry.
ciphers_client optional str None Set supported ciphers for client connections using OpenSSL syntax.
ciphers_server optional str None Set supported ciphers for server connections using OpenSSL syntax.
client_certs optional str None Client certificate file or directory.
client_replay sequence of str [] Replay client requests from a saved file.
command_history bool True Persist command history between mitmproxy invocations.
confdir str ~/.mitmproxy Location of the default mitmproxy configuration files.
content_view_lines_cutoff int 512 Flow content view lines limit. Limit is enabled by default to speedup flows browsing.
dumper_default_contentview str auto The default content view mode.
Choices: auto, raw, hex, json, xml/html, wbxml, javascript, css, url-encoded, multipart form, image, query, protocol buffer
dumper_filter optional str None Limit which flows are dumped.
flow_detail int 1 The display detail level for flows in mitmdump: 0 (almost quiet) to 3 (very verbose). 0: shortened request URL, response status code, WebSocket and TCP message notifications. 1: full request URL with response status code 2: 1 + HTTP headers 3: 2 + full response content, content of WebSocket and TCP messages.
http2 bool True Enable/disable HTTP/2 support. HTTP/2 support is enabled by default.
http2_priority bool False PRIORITY forwarding for HTTP/2 connections. Disabled by default to ensure compatibility with misbehaving servers.
ignore_hosts sequence of str [] Ignore host and forward all traffic without processing it. In transparent mode, it is recommended to use an IP address (range), not the hostname. In regular mode, only SSL traffic is ignored and the hostname should be used. The supplied value is interpreted as a regular expression and matched on the ip or the hostname.
keep_host_header bool False Reverse Proxy: Keep the original host header instead of rewriting it to the reverse proxy target.
keepserving bool False Continue serving after client playback, server playback or file read. This option is ignored by interactive tools, which always keep serving.
key_size int 2048 TLS key size for certificates and CA.
listen_host str Address to bind proxy to.
listen_port int 8080 Proxy service port.
map_local sequence of str [] Map remote resources to a local file using a pattern of the form "[/flow-filter]/url-regex/file-or-directory-path", where the separator can be any character.
map_remote sequence of str [] Map remote resources to another remote URL using a pattern of the form "[/flow-filter]/url-regex/replacement", where the separator can be any character.
mode str regular Mode can be "regular", "transparent", "socks5", "reverse:SPEC", or "upstream:SPEC". For reverse and upstream proxy modes, SPEC is host specification in the form of "http[s]://host[:port]".
modify_body sequence of str [] Replacement pattern of the form "[/flow-filter]/regex/[@]replacement", where the separator can be any character. The @ allows to provide a file path that is used to read the replacement string.
modify_headers sequence of str [] Header modify pattern of the form "[/flow-filter]/header-name/[@]header-value", where the separator can be any character. The @ allows to provide a file path that is used to read the header value string. An empty header-value removes existing header-name headers.
onboarding bool True Toggle the mitmproxy onboarding app.
onboarding_host str mitm.it Onboarding app domain. For transparent mode, use an IP when a DNS entry for the app domain is not present.
onboarding_port int 80 Port to serve the onboarding app from.
proxyauth optional str None Require proxy authentication. Format: "username:pass", "any" to accept any user/pass combination, "@path" to use an Apache htpasswd file, or "ldap[s]:url_server_ldap:dn_auth:password:dn_subtree" for LDAP authentication.
rawtcp bool False Enable/disable experimental raw TCP support. TCP connections starting with non-ascii bytes are treated as if they would match tcp_hosts. The heuristic is very rough, use with caution. Disabled by default.
readfile_filter optional str None Read only matching flows.
rfile optional str None Read flows from file.
save_stream_file optional str None Stream flows to file as they arrive. Prefix path with + to append.
save_stream_filter optional str None Filter which flows are written to file.
scripts sequence of str [] Execute a script.
server bool True Start a proxy server. Enabled by default.
server_replay sequence of str [] Replay server responses from a saved file.
server_replay_ignore_content bool False Ignore request's content while searching for a saved flow to replay.
server_replay_ignore_host bool False Ignore request's destination host while searching for a saved flow to replay.
server_replay_ignore_params sequence of str [] Request's parameters to be ignored while searching for a saved flow to replay.
server_replay_ignore_payload_params sequence of str [] Request's payload parameters (application/x-www-form-urlencoded or multipart/form-data) to be ignored while searching for a saved flow to replay.
server_replay_ignore_port bool False Ignore request's destination port while searching for a saved flow to replay.
server_replay_kill_extra bool False Kill extra requests during replay.
server_replay_nopop bool False Don't remove flows from server replay state after use. This makes it possible to replay same response multiple times.
server_replay_refresh bool True Refresh server replay responses by adjusting date, expires and last-modified headers, as well as adjusting cookie expiration.
server_replay_use_headers sequence of str [] Request headers to be considered during replay.
showhost bool False Use the Host header to construct URLs for display.
spoof_source_address bool False Use the client's IP for server-side connections. Combine with --upstream-bind-address to spoof a fixed source address.
ssl_insecure bool False Do not verify upstream server SSL/TLS certificates.
ssl_verify_upstream_trusted_ca optional str None Path to a PEM formatted trusted CA certificate.
ssl_verify_upstream_trusted_confdir optional str None Path to a directory of trusted CA certificates for upstream server verification prepared using the c_rehash tool.
ssl_version_client str secure Set supported SSL/TLS versions for client connections. SSLv2, SSLv3 and 'all' are INSECURE. Defaults to secure, which is TLS1.0+.
Choices: all, secure, SSLv2, SSLv3, TLSv1, TLSv1_1, TLSv1_2
ssl_version_server str secure Set supported SSL/TLS versions for server connections. SSLv2, SSLv3 and 'all' are INSECURE. Defaults to secure, which is TLS1.0+.
Choices: all, secure, SSLv2, SSLv3, TLSv1, TLSv1_1, TLSv1_2
stickyauth optional str None Set sticky auth filter. Matched against requests.
stickycookie optional str None Set sticky cookie filter. Matched against requests.
stream_large_bodies optional str None Stream data to the client if response body exceeds the given threshold. If streamed, the body will not be stored in any way. Understands k/m/g suffixes, i.e. 3m for 3 megabytes.
stream_websockets bool False Stream WebSocket messages between client and server. Messages are captured and cannot be modified.
tcp_hosts sequence of str [] Generic TCP SSL proxy mode for all hosts that match the pattern. Similar to --ignore, but SSL connections are intercepted. The communication contents are printed to the log in verbose mode.
termlog_verbosity str info Log verbosity.
Choices: error, warn, info, alert, debug
upstream_auth optional str None Add HTTP Basic authentication to upstream proxy and reverse proxy requests. Format: username:password.
upstream_bind_address str Address to bind upstream requests to.
upstream_cert bool True Connect to upstream server to look up certificate details.
websocket bool True Enable/disable WebSocket support. WebSocket support is enabled by default.
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
  • 序言:七十年代末,一起剥皮案震惊了整个滨河市,随后出现的几起案子,更是在滨河造成了极大的恐慌,老刑警刘岩,带你破解...
    沈念sama阅读 203,098评论 5 476
  • 序言:滨河连续发生了三起死亡事件,死亡现场离奇诡异,居然都是意外死亡,警方通过查阅死者的电脑和手机,发现死者居然都...
    沈念sama阅读 85,213评论 2 380
  • 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
    开封第一讲书人阅读 149,960评论 0 336
  • 文/不坏的土叔 我叫张陵,是天一观的道长。 经常有香客问我,道长,这世上最难降的妖魔是什么? 我笑而不...
    开封第一讲书人阅读 54,519评论 1 273
  • 正文 为了忘掉前任,我火速办了婚礼,结果婚礼上,老公的妹妹穿的比我还像新娘。我一直安慰自己,他们只是感情好,可当我...
    茶点故事阅读 63,512评论 5 364
  • 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
    开封第一讲书人阅读 48,533评论 1 281
  • 那天,我揣着相机与录音,去河边找鬼。 笑死,一个胖子当着我的面吹牛,可吹牛的内容都是我干的。 我是一名探鬼主播,决...
    沈念sama阅读 37,914评论 3 395
  • 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
    开封第一讲书人阅读 36,574评论 0 256
  • 序言:老挝万荣一对情侣失踪,失踪者是张志新(化名)和其女友刘颖,没想到半个月后,有当地人在树林里发现了一具尸体,经...
    沈念sama阅读 40,804评论 1 296
  • 正文 独居荒郊野岭守林人离奇死亡,尸身上长有42处带血的脓包…… 初始之章·张勋 以下内容为张勋视角 年9月15日...
    茶点故事阅读 35,563评论 2 319
  • 正文 我和宋清朗相恋三年,在试婚纱的时候发现自己被绿了。 大学时的朋友给我发了我未婚夫和他白月光在一起吃饭的照片。...
    茶点故事阅读 37,644评论 1 329
  • 序言:一个原本活蹦乱跳的男人离奇死亡,死状恐怖,灵堂内的尸体忽然破棺而出,到底是诈尸还是另有隐情,我是刑警宁泽,带...
    沈念sama阅读 33,350评论 4 318
  • 正文 年R本政府宣布,位于F岛的核电站,受9级特大地震影响,放射性物质发生泄漏。R本人自食恶果不足惜,却给世界环境...
    茶点故事阅读 38,933评论 3 307
  • 文/蒙蒙 一、第九天 我趴在偏房一处隐蔽的房顶上张望。 院中可真热闹,春花似锦、人声如沸。这庄子的主人今日做“春日...
    开封第一讲书人阅读 29,908评论 0 19
  • 文/苍兰香墨 我抬头看了看天上的太阳。三九已至,却和暖如春,着一层夹袄步出监牢的瞬间,已是汗流浃背。 一阵脚步声响...
    开封第一讲书人阅读 31,146评论 1 259
  • 我被黑心中介骗来泰国打工, 没想到刚下飞机就差点儿被人妖公主榨干…… 1. 我叫王不留,地道东北人。 一个月前我还...
    沈念sama阅读 42,847评论 2 349
  • 正文 我出身青楼,却偏偏与公主长得像,于是被迫代替她去往敌国和亲。 传闻我的和亲对象是个残疾皇子,可洞房花烛夜当晚...
    茶点故事阅读 42,361评论 2 342