mitmproxy/mitmproxy
Denis Kasak 856a35af6d
Use original flow host instead of IP when exporting to curl/httpie. (#4307)
Use original flow host instead of IP when exporting to curl/httpie.

Unless this is done, the SNI server name will not be sent, often making
the curl/httpie command have different behaviour than the original
request (most often in the form of failing to establish a TLS
connection).

With this change, we always use the original host, fixing this failure.
However, if the original host is a domain, it may sometimes resolve to
a different IP address later on. In curl, we solve this problem by
forcing it to connect to the original IP using `--resolve`. For httpie
there is currently no easy solution (see:
https://github.com/httpie/httpie/issues/414).
2021-02-09 18:44:46 +00:00
..
addons Use original flow host instead of IP when exporting to curl/httpie. (#4307) 2021-02-09 18:44:46 +00:00
contentviews move Headers/Message/Request/Response into mitmproxy.http 2021-02-05 08:43:15 +01:00
contrib update mypy 2021-02-03 23:03:49 +01:00
coretypes pyupgrade --py36-plus mitmproxy/**/*.py 2020-11-20 19:25:26 +01:00
io fix conversion of old flows failing due to missing array keys 2021-01-25 16:27:33 +01:00
net move Headers/Message/Request/Response into mitmproxy.http 2021-02-05 08:43:15 +01:00
platform revert some minor changes 2020-11-21 10:46:19 +01:00
proxy move Connections to mitmproxy.connection 2021-02-05 08:44:17 +01:00
script converge on hooks, events, and commands 2021-01-05 22:00:54 +01:00
test move Connections to mitmproxy.connection 2021-02-05 08:44:17 +01:00
tools Merge pull request #4435 from alt-glitch/master 2021-02-09 12:39:14 +01:00
utils [#4235] Automatic view mode based on should_render method (#4236) 2021-01-17 11:39:51 +01:00
__init__.py fix windows tests failing due to tornado bug 2020-08-27 00:25:08 +02:00
addonmanager.py converge on hooks, events, and commands 2021-01-05 22:00:54 +01:00
certs.py update mypy 2021-02-03 23:03:49 +01:00
command_lexer.py Changes on console error 2020-05-01 14:54:08 +05:30
command.py pyupgrade --py36-plus mitmproxy/**/*.py 2020-11-20 19:25:26 +01:00
connection.py move Connections to mitmproxy.connection 2021-02-05 08:44:17 +01:00
controller.py Reply: remove return value 2020-12-28 22:09:57 +01:00
ctx.py update mypy 2019-11-12 04:38:13 +01:00
eventsequence.py converge on hooks, events, and commands 2021-01-05 22:00:54 +01:00
exceptions.py Reply: remove return value 2020-12-28 22:09:57 +01:00
flow.py docs: flow.Error 2021-02-05 08:44:17 +01:00
flowfilter.py fix deprecation warnings in context client/server 2020-12-14 22:14:44 +01:00
hooks.py duplicate hooks: warn instead of raise 2021-01-16 20:31:50 +01:00
http.py move Connections to mitmproxy.connection 2021-02-05 08:44:17 +01:00
log.py converge on hooks, events, and commands 2021-01-05 22:00:54 +01:00
master.py deep-link to GitHub issues page on crashes 2021-01-17 11:27:50 +01:00
options.py warn about nonfunctioning options, permanently remove unused ones. 2021-01-01 18:34:15 +01:00
optmanager.py pyupgrade --py36-plus mitmproxy/**/*.py 2020-11-20 19:25:26 +01:00
py.typed Add py.typed stub as per PEP-561 2019-12-29 14:19:39 +02:00
stateobject.py pyupgrade --py36-plus mitmproxy/**/*.py 2020-11-20 19:25:26 +01:00
tcp.py view addon: systematize different flow types 2020-04-11 23:58:33 +02:00
types.py fix deprecation warnings in context client/server 2020-12-14 22:14:44 +01:00
version.py sni/alpn: bytes -> str 2020-12-30 20:26:31 +01:00
websocket.py speed-up deprecation process 2020-12-14 23:52:48 +01:00