本文为大家分享的是node.js端口转发实现代码,供大家参考,具体内容如下
#!/sbin/node
var net = require('net');
function proxyPort(srcport,destServer,destport)
{
var server = net.createServer(function(c) { //'connection' listener
c.on('end', function() {
console.log('src disconnected');
});
var client = net.con