mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-29 19:08:44 +00:00
Minor docs and example script fixes.
This commit is contained in:
parent
70dff87240
commit
1af26bb915
@ -3,7 +3,7 @@ console interface that allows traffic flows to be inspected and edited on the
|
|||||||
fly.
|
fly.
|
||||||
|
|
||||||
__mitmdump__ is the command-line version of mitmproxy, with the same
|
__mitmdump__ is the command-line version of mitmproxy, with the same
|
||||||
functionality but without the frills. Think tcpdump for HTTP.
|
functionality but without the user interface. Think tcpdump for HTTP.
|
||||||
|
|
||||||
Both tools are fully documentented in the commandline _--help_ flag, and, in
|
Both tools are fully documentented in the commandline _--help_ flag, and, in
|
||||||
the case of __mitmproxy__, a built-in help page accessible through the _?_
|
the case of __mitmproxy__, a built-in help page accessible through the _?_
|
||||||
@ -17,7 +17,7 @@ Features
|
|||||||
- Save complete HTTP conversations for later replay and analysis.
|
- Save complete HTTP conversations for later replay and analysis.
|
||||||
- Replay the client-side of an HTTP conversations.
|
- Replay the client-side of an HTTP conversations.
|
||||||
- Replay HTTP responses of a previously recorded server.
|
- Replay HTTP responses of a previously recorded server.
|
||||||
- Reverse proxy mode to forward traffic to a specified server
|
- Reverse proxy mode to forward traffic to a specified server.
|
||||||
- Make scripted changes to HTTP traffic using Python.
|
- Make scripted changes to HTTP traffic using Python.
|
||||||
- SSL certificates for interception are generated on the fly.
|
- SSL certificates for interception are generated on the fly.
|
||||||
|
|
||||||
|
@ -0,0 +1,8 @@
|
|||||||
|
|
||||||
|
- command-line: _-R_ http[s]://hostname[:port]
|
||||||
|
- mitmproxy shortcut: _R_
|
||||||
|
|
||||||
|
In reverse proxy mode, mitmproxy acts as a standard HTTP server and forwards
|
||||||
|
all requests to the specified upstream server. Note that the displayed URL for
|
||||||
|
flows in this mode will use the value of the __Host__ header field from the
|
||||||
|
request, not the reverse proxy server.
|
Binary file not shown.
Before Width: | Height: | Size: 171 KiB After Width: | Height: | Size: 70 KiB |
@ -30,10 +30,10 @@ class MyMaster(flow.FlowMaster):
|
|||||||
return f
|
return f
|
||||||
|
|
||||||
|
|
||||||
ssl_config = proxy.SSLConfig(
|
config = proxy.ProxyConfig(
|
||||||
cacert = os.path.expanduser("~/.mitmproxy/mitmproxy-ca.pem")
|
cacert = os.path.expanduser("~/.mitmproxy/mitmproxy-ca.pem")
|
||||||
)
|
)
|
||||||
state = flow.State()
|
state = flow.State()
|
||||||
server = proxy.ProxyServer(ssl_config, 8080)
|
server = proxy.ProxyServer(config, 8080)
|
||||||
m = MyMaster(server, state)
|
m = MyMaster(server, state)
|
||||||
m.run()
|
m.run()
|
||||||
|
@ -34,9 +34,9 @@ class StickyMaster(controller.Master):
|
|||||||
msg._ack()
|
msg._ack()
|
||||||
|
|
||||||
|
|
||||||
ssl_config = proxy.SSLConfig(
|
config = proxy.ProxyConfig(
|
||||||
cacert = os.path.expanduser("~/.mitmproxy/mitmproxy-ca.pem")
|
cacert = os.path.expanduser("~/.mitmproxy/mitmproxy-ca.pem")
|
||||||
)
|
)
|
||||||
server = proxy.ProxyServer(ssl_config, 8080)
|
server = proxy.ProxyServer(config, 8080)
|
||||||
m = StickyMaster(server)
|
m = StickyMaster(server)
|
||||||
m.run()
|
m.run()
|
||||||
|
@ -30,7 +30,6 @@ class ProxyConfig:
|
|||||||
self.reverse_proxy = reverse_proxy
|
self.reverse_proxy = reverse_proxy
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def read_headers(fp):
|
def read_headers(fp):
|
||||||
"""
|
"""
|
||||||
Read a set of headers from a file pointer. Stop once a blank line
|
Read a set of headers from a file pointer. Stop once a blank line
|
||||||
|
Loading…
Reference in New Issue
Block a user