Closed abelnation closed 9 years ago
Hey,
Hmm. I think you might be able to do that in a few ways. First you could close the socket given to the socket
event on your Mitm
instance with regular Socket
functions (socket.end
, socket.close
etc). As for error, the connect
event is given the client side socket. You could try either throwing from that handler or emitting error
on that client side socket.
Let me know if these work. Cheers.
I figured out this issue. I assumed the object returned by mitm() was the socket, but you have to set the socket from the onConnect callback param
Yeah, for every intercepted connection Mitm gives you a new socket. ;-)
Feel free to ask further or close the issue once you get it all working. :)
Is there a way to simulate a socket error, or socket close using mitm?
Thanks