Skip to content

Instantly share code, notes, and snippets.

@tim-smart
Created June 30, 2010 02:06
Show Gist options
  • Save tim-smart/458121 to your computer and use it in GitHub Desktop.
Save tim-smart/458121 to your computer and use it in GitHub Desktop.
var net = require('net'), sys = require('sys');
net.createServer(function (source_stream) {
source_stream.addListener('connect', function () {
var target_stream = new net.Stream();
target_stream.addListener('connect', function () {
sys.pump(source_stream, target_stream);
});
target_stream.connect(8080);
});
}).listen(80);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment