node-mitm icon indicating copy to clipboard operation
node-mitm copied to clipboard

Expose connect options and the client socket via a _mitm property

Open papandreou opened this issue 7 years ago • 6 comments

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

papandreou avatar Aug 03 '16 01:08 papandreou

@moll Any feedback on this, or the general idea of providing it?

papandreou avatar Aug 24 '16 11:08 papandreou

This PR also gives a nice way to bypass requests. Like described in https://github.com/moll/node-mitm/issues/16.

dempfi avatar May 21 '17 07:05 dempfi

@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.

jakzo avatar Nov 07 '18 09:11 jakzo

Ping @moll?

papandreou avatar Feb 17 '20 18:02 papandreou

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 avatar Dec 20 '21 23:12 moll

@moll Hi there! This looks super useful, do you think this MR could be moved forward? TIA!

forty avatar Nov 03 '23 16:11 forty