Mitmproxy: Add --keep-host-header

Created on 17 Feb 2017  路  4Comments  路  Source: mitmproxy/mitmproxy

Steps to reproduce the problem:
  1. mitmdump -R https://httpbin.org/
  2. curl localhost:8080/headers

This returns "Host": "httpbin.org" instead of "Host": "localhost", which was what the original curl request sent. We want to add a --keep-host-header to disable our automatic host header rewrite here. For a discussion of the rationale, see https://github.com/mitmproxy/mitmproxy/pull/2034#issuecomment-280770573.

Once implemented, we should change the dns_spoofing example to use that instead of doing the requestheaders dance. First, however, let's keep the PR small and only add the switch.

areprotocols help wanted

All 4 comments

Hello, I'd like to work on that issue as my first contribution to the project

Hi @marncz,
I was working on this and about to submit a PR, please consider other issues.

@krsoninikhil no problem, thanks for letting me know :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dmorgun picture dmorgun  路  4Comments

beth92 picture beth92  路  4Comments

jimhigson picture jimhigson  路  3Comments

XericZephyr picture XericZephyr  路  5Comments

ffernand picture ffernand  路  4Comments