I have seen this issue indicating that handling protocols in which the server sends the first message (like MySQL) was not possible as of Feb. 2016.
I would be interested in coding this feature so that I can snoop MySQL traffic using the
--tcp option. I have a few questions:
- Would the owners/maintainers welcome such an addition?
- Has anything changed in the last year that would make this easier to implement than it was when that issue was filed?
You’re stumbling upon mitmproxy’s pain points it seems - sorry about that
Would the owners/maintainers welcome such an addition?
Definitely yes. The sans-io branch in fact already has this working (https://github.com/mitmproxy/mitmproxy/issues/1775 / https://github.com/mitmproxy/mitmproxy/tree/sans-io), but there’s just a lot of work left before that can replace our current protocol implementation. If you have a decent workaround that works with the current protocol stack, I’d of course be happy to merge that, but see below.
Has anything changed in the last year that would make this easier to implement than it was when that issue was filed?
Not really, but I do have a workaround addon for exactly that problem: https://gist.github.com/mhils/3a1ebb56479fc7c660942c57cb37312d. That may actually be the most pragmatic approach for now.
Thank you very much
Your workaround was quite easy to deploy for me, so I’m good for now. sans-io branch looks very cool I will keep an eye on that.