Redirect multiple domains to a single domain

I looked around for several hours and couldn’t find a solution to my problem.

I want to redirect to where resolves to my mitmproxy server and resolves to a email client login page I created that replaces my hosting partners webmail page.

i.e. this is a server to server redirection one might use apache vhosts but I would like to use mitm instead.

Any help would be appreciated.

I have tried so many different tests I didnt post any of them because I thought it would be more confusing. The most recent thing I tried is:
mitmproxy -R -p 80 --replace :~q:abc:xyz --replace :~q:webmail:abccom

There is never a response with the replacements so it times out.

How should that redirection look like? Do you want to display the contents of at Do That could be tricky: Do you want to send a HTTP 30x redirect? What exactly are you trying to accomplish?

Thanks for the help.

I am essentially redirecting all port 80 requests for webmail to a custom login screen by domain.

I was able to get mitmproxy working after modifying the and a lot of trial and error.

Do you have any startup script examples of running mitmdump for ubuntu 16.04?

We don’t, but that’s a rather non-mitmproxy-specific problem, so you should find a lot of examples for writing systemd service files on Google/StackOverflow. :slight_smile: