mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-27 02:24:18 +00:00
Docs - pathoc and pathod proxy behaviour
This commit is contained in:
parent
ed7ef84557
commit
369b55b094
@ -126,15 +126,25 @@ the command-line help:</p>
|
|||||||
<h1>Interacting with Proxies</h1>
|
<h1>Interacting with Proxies</h1>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<p>At the moment, pathoc has no explicit support for proxies, but there's a
|
<p>Pathoc has a reasonably sophisticated suite of features for interacting
|
||||||
workaround that serves many use cases. Instead of specifying just a path,
|
with proxies. The proxy request syntax very closely mirrors that of
|
||||||
specify an entire URL to the GET request, like so (assuming there's a proxy
|
straight HTTP, which means that it is possible to make proxy-style requests
|
||||||
running on port 8080 of localhost):</p>
|
using pathoc without any additional syntax, by simply specifying a full URL
|
||||||
|
instead of a simple path::</p>
|
||||||
|
|
||||||
<pre class="terminal">> pathoc -p 8080 localhost "get:'http://google.com'"</pre>
|
<pre class="terminal">> pathoc -p 8080 localhost "get:'http://google.com'"</pre>
|
||||||
|
|
||||||
<p>Proxy support is going to be a major focus of development for the next
|
<p>Another common use case is to use an HTTP CONNECT request to probe
|
||||||
version of pathoc, so keep an eye on the repo.</p>
|
remote servers via a proxy. This is done with the <b>-c</b> command-line
|
||||||
|
option, which allows you to specify a remote host and port pair:</p>
|
||||||
|
|
||||||
|
<pre class="terminal">> pathoc -c google.com:80 -p 8080 localhost get:/</pre>
|
||||||
|
|
||||||
|
<p>Note that pathoc does <b>not</b> negotiate SSL without being explictly
|
||||||
|
instructed to do so. If you're making a CONNECT request to an SSL-protected
|
||||||
|
resource, you must also pass the <b>-s</b> flag:</p>
|
||||||
|
|
||||||
|
<pre class="terminal">> pathoc -sc google.com:443 -p 8080 localhost get:/</pre>
|
||||||
|
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
@ -55,9 +55,11 @@ proxy requests, the upstream host is ignored, and the path portion of the URL
|
|||||||
is used to match anchors. This lets you test software that supports a proxy
|
is used to match anchors. This lets you test software that supports a proxy
|
||||||
configuration by spoofing responses from upstream servers.</p>
|
configuration by spoofing responses from upstream servers.</p>
|
||||||
|
|
||||||
<p>Proxy mode operates even when Pathod is run in SSL mode, but we do not
|
<p>By default, we treat all proxy CONNECT requests as HTTPS traffic, serving
|
||||||
support nested SSL connections. This means that CONNECT requests will cause an
|
the response using either pathod's built-in certificates, or the cert/key pair
|
||||||
error response.</p>
|
specified by the user. You can over-ride this behaviour if you're testing a
|
||||||
|
client that makes a non-SSL CONNECT request using the -C command-line
|
||||||
|
option.</p>
|
||||||
|
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user