Skip to content
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

Running mitmproxy's reverse-proxy mode locally #6737

Closed
fsturmat opened this issue Mar 15, 2024 · 3 comments
Closed

Running mitmproxy's reverse-proxy mode locally #6737

fsturmat opened this issue Mar 15, 2024 · 3 comments
Labels
kind/feature New features / enhancements

Comments

@fsturmat
Copy link

Problem Description

I have been trying to run mitmproxy's reverse proxy on the same machine that runs the application that is to be "mitm'd". Unfortunately, the good, old hosts-file approach fails because mitmproxy is also using the hosts file to resolve its domain names. I lost my sanity trying to solve this issue.

"How mitmproxy Sucks at Being a Proxy"

Proposal

Maybe some way to let mitmproxy ignore the hosts file... or maybe some way to specify which DNS config mitmproxy should use... or at least some way to have a script perform its own name resolution?

@fsturmat fsturmat added the kind/feature New features / enhancements label Mar 15, 2024
@Prinzhorn

This comment was marked as outdated.

@mhils
Copy link
Member

mhils commented Mar 15, 2024

Meta comment: "How mitmproxy Sucks" may not be the best way to provide constructive feedback and introduce yourself. Your actual criticism is well-founded, and that takes away from that point.

On your points:

  1. Having a dns_server option would be really nice. We currently just rely on getaddrinfo, which always takes /etc/hosts into account. I've filed Add dns_server option. #6739. Contributions welcome!
  2. Re DNS spoofing: Our docs are a bit outdated here, see Nuke dns_spoofing.py addon and fix docs #6738

Last but not least, let me say that #6531 will be the best solution to your original problem, but it's Windows and macOS only for now.

@mhils
Copy link
Member

mhils commented Mar 20, 2024

Closing this in favor of the two issues mentioned above - thanks again for filing this!

@mhils mhils closed this as completed Mar 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature New features / enhancements
Projects
None yet
Development

No branches or pull requests

3 participants