Cmd line tool and CommonJS module for performing quick-and-dirty TCP tunneling/proxy to another machine. Useful for working with services running on remote machines.
Creats quick-and-dirty ad-hoc local tcp connection tunnel / proxy to another port / machine.
$ npm install -g tcpmole
EXAMPLE: Create local tunnels to run your redis-based tests on production servers:
$ tcpmole 6379 your-amazon-host.amazon.com:6379
This will makes your local port 6379 actually connects to amazon! :)
Wanna see all the live traffic going through the tunnel? Just add
$ tcpmole --monitor 6379 your-amazon-host.amazon.com:6379
Much easier than writing obscure package capture language for sure!
$ tcpmole --monitor 80 3000
Now sends something to port 80 and you should see the HTTP packets being sent.
Right now the mole exports a simple function that creates proxying server when invoked:
var mole = require'tcpmole'opts =src: port: 80dest: host: '0.0.0.0' port: 8080tunnel = moleopts;tunnelon'connection'// a connection has been made to the mole;