mirror of
https://github.com/jaywcjlove/reference.git
synced 2025-06-19 05:31:21 +08:00
doc: update docs/mitmproxy.md fbd3a4fffa
This commit is contained in:
@ -48,7 +48,7 @@
|
||||
<p><a href="https://mitmproxy.org/">Mitmproxy</a> 是一个免费开源的交互式 HTTPS 代理。这是 mitmproxy 的快速参考备忘单。</p>
|
||||
</div></header><div class="menu-tocs"><div class="menu-btn"><svg aria-hidden="true" fill="currentColor" height="1em" width="1em" viewBox="0 0 16 16" version="1.1" data-view-component="true">
|
||||
<path fill-rule="evenodd" d="M2 4a1 1 0 100-2 1 1 0 000 2zm3.75-1.5a.75.75 0 000 1.5h8.5a.75.75 0 000-1.5h-8.5zm0 5a.75.75 0 000 1.5h8.5a.75.75 0 000-1.5h-8.5zm0 5a.75.75 0 000 1.5h8.5a.75.75 0 000-1.5h-8.5zM3 8a1 1 0 11-2 0 1 1 0 012 0zm-1 6a1 1 0 100-2 1 1 0 000 2z"></path>
|
||||
</svg></div><div class="menu-modal"><a aria-hidden="true" class="leve2 tocs-link" data-num="2" href="#入门">入门</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#使用">使用</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#移动">移动</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#安装">安装</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#代理模式">代理模式</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#流视图">流(视图)</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#常见的快捷键">常见的快捷键</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#全局键绑定">全局键绑定</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#代理选项">代理选项</a><a aria-hidden="true" class="leve2 tocs-link" data-num="2" href="#mitmproxy-过滤器">Mitmproxy 过滤器</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#过滤器">过滤器</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#运算符">运算符</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#表达式">表达式</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#流选择器">流选择器</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#示例">示例</a><a aria-hidden="true" class="leve2 tocs-link" data-num="2" href="#mitmproxy-脚本">Mitmproxy 脚本</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#custom-response">Custom response</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#add-header">Add header</a><a aria-hidden="true" class="leve2 tocs-link" data-num="2" href="#另见">另见</a></div></div><div class="h1wrap-body"><div class="wrap h2body-exist"><div class="wrap-header h2wrap"><h2 id="入门"><a aria-hidden="true" tabindex="-1" href="#入门"><span class="icon icon-link"></span></a>入门</h2><div class="wrap-body">
|
||||
</svg></div><div class="menu-modal"><a aria-hidden="true" class="leve2 tocs-link" data-num="2" href="#入门">入门</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#使用">使用</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#移动">移动</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#安装">安装</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#代理模式">代理模式</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#复制到剪贴板">复制到剪贴板</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#保存到文件">保存到文件</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#流视图">流(视图)</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#常见的快捷键">常见的快捷键</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#全局键绑定">全局键绑定</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#代理选项">代理选项</a><a aria-hidden="true" class="leve2 tocs-link" data-num="2" href="#mitmproxy-过滤器">Mitmproxy 过滤器</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#过滤器">过滤器</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#运算符">运算符</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#表达式">表达式</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#流选择器">流选择器</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#示例">示例</a><a aria-hidden="true" class="leve2 tocs-link" data-num="2" href="#mitmproxy-脚本">Mitmproxy 脚本</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#custom-response">Custom response</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#add-header">Add header</a><a aria-hidden="true" class="leve2 tocs-link" data-num="2" href="#另见">另见</a></div></div><div class="h1wrap-body"><div class="wrap h2body-exist"><div class="wrap-header h2wrap"><h2 id="入门"><a aria-hidden="true" tabindex="-1" href="#入门"><span class="icon icon-link"></span></a>入门</h2><div class="wrap-body">
|
||||
</div></div><div class="h2wrap-body"><div class="wrap h3body-not-exist col-span-2"><div class="wrap-header h3wrap"><h3 id="使用"><a aria-hidden="true" tabindex="-1" href="#使用"><span class="icon icon-link"></span></a>使用</h3><div class="wrap-body">
|
||||
<!--rehype:wrap-class=col-span-2-->
|
||||
|
||||
@ -151,7 +151,8 @@
|
||||
<hr>
|
||||
<pre class="language-bash"><code class="language-bash code-highlight"><span class="code-line">$ brew <span class="token function">install</span> mitmproxy <span class="token comment"># macOS</span>
|
||||
</span></code></pre>
|
||||
</div></div></div><div class="wrap h3body-not-exist"><div class="wrap-header h3wrap"><h3 id="代理模式"><a aria-hidden="true" tabindex="-1" href="#代理模式"><span class="icon icon-link"></span></a>代理模式</h3><div class="wrap-body">
|
||||
</div></div></div><div class="wrap h3body-not-exist col-span-2"><div class="wrap-header h3wrap"><h3 id="代理模式"><a aria-hidden="true" tabindex="-1" href="#代理模式"><span class="icon icon-link"></span></a>代理模式</h3><div class="wrap-body">
|
||||
<!--rehype:wrap-class=col-span-2-->
|
||||
|
||||
|
||||
|
||||
@ -179,6 +180,80 @@
|
||||
|
||||
<table class="style-list"><thead><tr><th align="left">Argument</th><th>Effect</th></tr></thead><tbody><tr><td align="left"><code>-R REVERSE_PROXY</code>, <code>--reverse REVERSE_PROXY</code></td><td>将所有请求转发到上游 HTTP 服务器:<code>http[s]://host[:port]</code>。客户端始终可以通过 <code>HTTPS</code> 和 <code>HTTP</code> 进行连接,与服务器的连接由指定的方案决定</td></tr><tr><td align="left"><code>--socks</code></td><td>设置 <code>SOCKS5</code> 代理模式</td></tr><tr><td align="left"><code>-T</code>, <code>--transparent</code></td><td>设置透明代理模式</td></tr><tr><td align="left"><code>-U UPSTREAM_PROXY</code>, <code>--upstream UPSTREAM_PROXY</code></td><td>将所有请求转发到上游代理服务器:<code>http://host[:port]</code></td></tr></tbody></table>
|
||||
<!--rehype:className=style-list-->
|
||||
</div></div></div><div class="wrap h3body-not-exist"><div class="wrap-header h3wrap"><h3 id="复制到剪贴板"><a aria-hidden="true" tabindex="-1" href="#复制到剪贴板"><span class="icon icon-link"></span></a>复制到剪贴板</h3><div class="wrap-body">
|
||||
<p>命令语法:</p>
|
||||
<pre><code class="code-highlight"><span class="code-line">:export.clip format flow
|
||||
</span></code></pre>
|
||||
<p>例子:</p>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<table class="style-list"><thead><tr><th>描述</th><th>命令示例</th></tr></thead><tbody><tr><td>1. 复制为 curl 命令</td><td><code>:export.clip curl @focus</code></td></tr><tr><td>2. 复制为 httpie</td><td><code>:export.clip httpie @focus</code></td></tr><tr><td>3. 复制为原始文件</td><td><code>:export.clip raw @focus</code></td></tr><tr><td>4. 复制为原始 HTTP 请求</td><td><code>:export.clip raw_request @focus</code></td></tr><tr><td>5. 复制为原始 HTTP 响应</td><td><code>:export.clip raw_response @focus</code></td></tr></tbody></table>
|
||||
<!--rehype:className=style-list-->
|
||||
<p>将流程导出到系统剪贴板</p>
|
||||
</div></div></div><div class="wrap h3body-not-exist"><div class="wrap-header h3wrap"><h3 id="保存到文件"><a aria-hidden="true" tabindex="-1" href="#保存到文件"><span class="icon icon-link"></span></a>保存到文件</h3><div class="wrap-body">
|
||||
<p>命令语法:</p>
|
||||
<pre><code class="code-highlight"><span class="code-line">:export.file format flow path
|
||||
</span></code></pre>
|
||||
<p>例子:</p>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<table class="style-list"><thead><tr><th>描述</th><th>命令示例</th></tr></thead><tbody><tr><td>1. 导出到 <code>/tmp/a.curl</code></td><td><code>:export.file curl @focus /tmp/a.curl</code></td></tr><tr><td>2. 导出到 <code>/tmp/a.httpie</code></td><td><code>:export.file httpie @focus /tmp/a.httpie</code></td></tr><tr><td>3. 导出到 <code>/tmp/a.raw</code></td><td><code>:export.file raw @focus /tmp/a.raw</code></td></tr><tr><td>4. 导出到 <code>/tmp/a.request</code></td><td><code>:export.file raw_request @focus /tmp/a.request</code></td></tr><tr><td>5. 导出到 <code>/tmp/a.response</code></td><td><code>:export.file raw_response @focus /tmp/a.response</code></td></tr></tbody></table>
|
||||
<!--rehype:className=style-list-->
|
||||
<p>将流程导出到系统剪贴板</p>
|
||||
</div></div></div><div class="wrap h3body-not-exist row-span-2"><div class="wrap-header h3wrap"><h3 id="流视图"><a aria-hidden="true" tabindex="-1" href="#流视图"><span class="icon icon-link"></span></a>流(视图)</h3><div class="wrap-body">
|
||||
<!--rehype:wrap-class=row-span-2-->
|
||||
|
||||
|
@ -1324,7 +1324,7 @@
|
||||
<!--rehype:class=home-card home-links-->
|
||||
<p>如果你有资源,可以很方便<a href="https://github.com/jaywcjlove/reference/issues/102#issue-1451649637">部署 web 版</a>,这非常简单,只需要克隆 <a href="https://github.com/jaywcjlove/reference/tree/gh-pages">gh-pages</a> 分支代码到你的静态服务就可以了,还可以使用 <a href="https://hub.docker.com/r/wcjiang/reference">docker</a> 快捷部署 web 版。</p>
|
||||
|
||||
</div></div><div class="h2wrap-body"></div></div></div></div><footer class="footer-wrap"><footer class="max-container">© 2022 Kenny Wang. Updated on 2023/08/16 23:02:50</footer></footer><script src="data.js?v=1.4.1" defer></script><script src="js/fuse.min.js?v=1.4.1" defer></script><script src="js/main.js?v=1.4.1" defer></script><div id="mysearch"><div class="mysearch-box"><div class="mysearch-input"><div><svg xmlns="http://www.w3.org/2000/svg" height="1em" width="1em" viewBox="0 0 18 18">
|
||||
</div></div><div class="h2wrap-body"></div></div></div></div><footer class="footer-wrap"><footer class="max-container">© 2022 Kenny Wang. Updated on 2023/08/16 23:20:40</footer></footer><script src="data.js?v=1.4.1" defer></script><script src="js/fuse.min.js?v=1.4.1" defer></script><script src="js/main.js?v=1.4.1" defer></script><div id="mysearch"><div class="mysearch-box"><div class="mysearch-input"><div><svg xmlns="http://www.w3.org/2000/svg" height="1em" width="1em" viewBox="0 0 18 18">
|
||||
<path fill="currentColor" d="M17.71,16.29 L14.31,12.9 C15.4069846,11.5024547 16.0022094,9.77665502 16,8 C16,3.581722 12.418278,0 8,0 C3.581722,0 0,3.581722 0,8 C0,12.418278 3.581722,16 8,16 C9.77665502,16.0022094 11.5024547,15.4069846 12.9,14.31 L16.29,17.71 C16.4777666,17.8993127 16.7333625,18.0057983 17,18.0057983 C17.2666375,18.0057983 17.5222334,17.8993127 17.71,17.71 C17.8993127,17.5222334 18.0057983,17.2666375 18.0057983,17 C18.0057983,16.7333625 17.8993127,16.4777666 17.71,16.29 Z M2,8 C2,4.6862915 4.6862915,2 8,2 C11.3137085,2 14,4.6862915 14,8 C14,11.3137085 11.3137085,14 8,14 C4.6862915,14 2,11.3137085 2,8 Z"></path>
|
||||
</svg><input id="mysearch-input" type="search" placeholder="搜索" autocomplete="off"><div class="mysearch-clear"></div></div><button id="mysearch-close" type="button">搜索</button></div><div class="mysearch-result"><div id="mysearch-menu"></div><div id="mysearch-content"></div></div></div></div></body>
|
||||
</html>
|
||||
|
Reference in New Issue
Block a user