moll / node-mitm

Intercept and mock outgoing Node.js network TCP connections and HTTP requests for testing. Intercepts and gives you a Net.Socket, Http.IncomingMessage and Http.ServerResponse to test and respond with. Super useful when testing code that hits remote servers.
Other
636 stars 48 forks source link

Mitm just listen net events emitted by the current node process? #4

Closed zhang6464 closed 9 years ago

zhang6464 commented 9 years ago

What if I want to intercept the local computer's net steam, like the HTTP requests sent by my browser?

moll commented 9 years ago

Hey!

Yep. Mitm.js just intercepts connections from within your Node.js process. Its primary use case is for testing. You can assert on a request and fake the response to see if your code works as you expect.

If you want to wiretap or change requests for the whole computer, look at tools like Wireshark or for man-in-the-middle proxy servers.

I'll close this issue for bookkeeping, but feel free to chat. ;-)