2

I've set up a virtual machine to redirect port 80 connections to some servers to my mitmproxy instance.

Now I wish to set up mitmproxy (or libmproxy) to modify and forward requests to a server of my choosing, depending on the HTTP Host header (and also modify responses). How do I accomplish this? Transparent proxy seems to read off the intended target server from the lower network layers, and I don't have that (the VM connects straight to my proxy).

user3840170
  • 26,597
  • 4
  • 30
  • 62

1 Answers1

0

For the current version (0.12.1), you can use https://github.com/mitmproxy/mitmproxy/blob/master/examples/dns_spoofing.py

The next release should ship with a dedicated --spoof switch.

Maximilian Hils
  • 6,309
  • 3
  • 27
  • 46