Closed bonesoul closed 9 years ago
Hey!
Ubuntu and any other Linux system is most definitely supported. I use Mitm.js myself both on Macs and Linuxes. Mitm.js's tests run on Travis CI, which is a Linux based system as well.
Sorry you're having trouble. Would you mind pasting a small example of how you're trying to use it. Thanks!
The code I'm using it;
https://github.com/int6/hpool-stratum/blob/master/test/integration/interceptor.js
and used by; https://github.com/int6/hpool-stratum/blob/master/test/integration/pool.js#L36
On windows, it's all doing good and but somehow it doesn't within my ubuntu machine.
Haven't run the code, but skimmed through it. A few comments:
Mitm()
and then disable
, you could just do new Mitm
. That won't enable it automatically.socket.bypass()
should bypass all MITMing on all connections. The request
event will never be fired. Are you trying to intercept only as subset of connections?@moll, thanks
setting a conditional for bypass fixed it.
if(options.host !== 'localhost' || options.port !== 9337)
socket.bypass();
Rather than calling Mitm() and then disable, you could just do new Mitm. That won't enable it automatically.
So should I just call _this.mitm = Mitm() and then enable() it once I want to use it?
You're welcome. Rather this.mitm = new Mitm
. Calling Mitm
as a function (without new
) does both new Mitm
and enable
internally.
If I can help more, let me know. Feel free to close this issue when you feel like it. ;-)
I was able to use node-mitm with my windows based setup and successfully intercept stuff but when I try with it node over ubuntu, events does not fire.
Any ideas?