New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
reverse proxy with multiple hosts as destination #486
Comments
Hi @chaserhkj, this closely resembles the use case where someone is doing a DNS spoofing attack. In general, using transparent mode is the better option but I realize that this may not always be possible.
Let me know how it works for you! Cheers, |
This is exactly what I want, the script works like a charm. Thanks a lot ! Happy Hacking! |
Hi @mhils, is this still supported as of today? Was looking for something similar, but couldn't find the example. |
Hi @felipekunzler , |
Perfect! Thanks. |
Hi, there
I wonder if mitmproxy could be used as a reverse proxy that accepts multiple destination which routes the request according to the
host:
header of the request.That is to say, it acts, like this:
www.a.com
andwww.b.com
for examples) to the proxy machine (such as modifying hosts file or dns hijacking).host:
header to determine the destination.host: www.a.com
will be routed tohttp://www.a.com
host: www.b.com
will be routed tohttp://www.b.com
It's quite like setting up an apache httpd on virtualhost with
server www.a.com
and on virtualhost withserver www.b.com
, both of which virtualhosts are configured with proper reverse proxy settings.I know that as the cert is delivered during the initialization of TLS connection, before any headers are transmitted, so it may cause cert issues while the cert hostname does not match with url hostname in https proxies. But let's assume that this will be used in http proxies or a wildcard cert would be used to match the hostnames.
Is it possible to do this in the mitmproxy framework by some already implemented feature, writing inline scripts or using libmitmproxy?
Thanks,
Happy Hacking!
The text was updated successfully, but these errors were encountered: