Last active
June 26, 2016 13:28
-
-
Save keevitaja/5f35241de225f609c0ecf5ad66276f43 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"use strict"; | |
const net = require('net'); | |
// const REMOTE_ADDR = 198.178.123.109; | |
// const REMOTE_PORT = 6555; | |
const REMOTE_ADDR = 'aardmud.org'; | |
const REMOTE_PORT = 4000; | |
let server = net.createServer((serverSocket)=> { | |
let clientSocket = net.createConnection(REMOTE_PORT, REMOTE_ADDR, ()=> { | |
clientSocket.on('data', (clientChunk)=> { | |
serverSocket.write(clientChunk); | |
}); | |
}) | |
serverSocket.on('data', (serverChunk)=> { | |
clientSocket.write(serverChunk); | |
}); | |
}); | |
server.listen(3000); | |
console.log('listening 3000 ...'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment