mitmproxy/mitmproxy/addons
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
..
onboardingapp fix #4362 2020-12-30 23:06:09 +01:00
__init__.py cleanup old proxy server 2020-12-28 14:33:10 +01:00
anticache.py Start moving addon options into /addons 2018-02-24 12:13:52 +13:00
anticomp.py Start moving addon options into /addons 2018-02-24 12:13:52 +13:00
asgiapp.py move Headers/Message/Request/Response into mitmproxy.http 2021-02-05 08:43:15 +01:00
block.py cleanup old event hook 2020-12-20 00:55:19 +01:00
browser.py pyupgrade --py36-plus mitmproxy/**/*.py 2020-11-20 19:25:26 +01:00
clientplayback.py move Connections to mitmproxy.connection 2021-02-05 08:44:17 +01:00
command_history.py command-history: fail-safe file handling 2020-11-17 23:08:57 +01:00
core.py converge on hooks, events, and commands 2021-01-05 22:00:54 +01:00
cut.py make mypy happy 2020-12-28 22:54:38 +01:00
disable_h2c.py Move options into ctx 2017-04-26 10:25:56 +12:00
dumper.py move Headers/Message/Request/Response into mitmproxy.http 2021-02-05 08:43:15 +01:00
eventstore.py add MitmproxyEvent for addon events 2021-01-05 21:54:44 +01:00
export.py Use original flow host instead of IP when exporting to curl/httpie. (#4307) 2021-02-09 18:44:46 +00:00
intercept.py intercept: tests++ 2020-08-27 11:37:35 +02:00
keepserving.py Redesign keepserving 2018-05-02 11:26:40 +12:00
maplocal.py move Headers/Message/Request/Response into mitmproxy.http 2021-02-05 08:43:15 +01:00
mapremote.py Reply: remove return value 2020-12-28 22:09:57 +01:00
modifybody.py Reply: remove return value 2020-12-28 22:09:57 +01:00
modifyheaders.py Collect all flow filter matches before modifying headers, fixes #4245 (#4246) 2021-02-09 19:37:46 +01:00
next_layer.py move Connections to mitmproxy.connection 2021-02-05 08:44:17 +01:00
onboarding.py add ASGI support for embedded apps 2020-08-13 17:22:31 +02:00
proxyauth.py move Connections to mitmproxy.connection 2021-02-05 08:44:17 +01:00
proxyserver.py converge on hooks, events, and commands 2021-01-05 22:00:54 +01:00
readfile.py pyupgrade --py36-plus mitmproxy/**/*.py 2020-11-20 19:25:26 +01:00
save.py pyupgrade --py36-plus mitmproxy/**/*.py 2020-11-20 19:25:26 +01:00
script.py converge on hooks, events, and commands 2021-01-05 22:00:54 +01:00
serverplayback.py converge on hooks, events, and commands 2021-01-05 22:00:54 +01:00
stickyauth.py addon options: setheaders, stickyauth 2018-02-24 15:45:12 +13:00
stickycookie.py update mypy 2019-11-12 04:38:13 +01:00
streambodies.py warn about nonfunctioning options, permanently remove unused ones. 2021-01-01 18:34:15 +01:00
termlog.py add MitmproxyEvent for addon events 2021-01-05 21:54:44 +01:00
tlsconfig.py move Connections to mitmproxy.connection 2021-02-05 08:44:17 +01:00
upstream_auth.py warn about nonfunctioning options, permanently remove unused ones. 2021-01-01 18:34:15 +01:00
view.py move Connections to mitmproxy.connection 2021-02-05 08:44:17 +01:00