You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<HTML><HEAD><meta http-equiv="content-type" content="text/html;charset=utf-8">
<TITLE>301 Moved - hack by go-mitmproxy </TITLE></HEAD><BODY>
<H1>301 Moved</H1>
The document has moved
<A HREF="http://www.google.com/">here</A>.
</BODY></HTML>
可以看到 Host 已经被修改为 google.com 了,并且返回的 HTML 也被修改了。这是预期的行为。
希望实现的效果: 在发出请求前修改 Host
比如下面的 Demo
运行命令
http_proxy=http://localhost:8000 curl http://baidu.com
返回可以看到 Host 已经被修改为
google.com
了,并且返回的 HTML 也被修改了。这是预期的行为。但是运行命令
https_proxy=http://localhost:8000 curl https://baidu.com
返回分析返回体可以发现,返回 HTML 的 Title 被成功修改了,但是返回的 HTML 仍然是由 baidu 返回的,所以说 Host 修改失败了。
The text was updated successfully, but these errors were encountered: