node-mitm
node-mitm copied to clipboard
Expose connect options and the client socket via a _mitm property
Fixes #14.
I ran into a scenario where it was impossible to pair up client sockets, connect options, and HTTP requests using the current API.
This (or something similar) makes it possible to avoid the guesswork and actually simplify my code a bit: https://github.com/unexpectedjs/unexpected-mitm/pull/19/files
@moll Any feedback on this, or the general idea of providing it?
This PR also gives a nice way to bypass requests. Like described in https://github.com/moll/node-mitm/issues/16.
@moll Is there any update on this? My specific problem is that I use .on('request')
but I have no way of knowing the full URL since the protocol could be http
or https
. This PR would solve this issue.
Ping @moll?
I think this still needs addressing. I'll reopen to come around to it eventually. And oh, Feb 17, 2020— that was almost before the apocalypse. Good times!
@moll Hi there! This looks super useful, do you think this MR could be moved forward? TIA!