Guest User

Untitled

a guest
Mar 21st, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.94 KB | None | 0 0
  1. -----------¦remote¦-----satellite link-----¦core¦---------
  2. port 6999 port 7000 port 6999
  3.  
  4. //remote.js
  5. var util=require('util');
  6. var net=require('net');
  7.  
  8. var input=net.createServer(function(inputStream){
  9. inputStream.on('data', function(data) {
  10. util.puts(data);
  11. });
  12. var output=net.createServer(function(outputStream) {
  13. outputStream.pipe(inputStream, {end: false});
  14.  
  15. outputStream.on('data',function(dta){
  16. util.puts(dta);
  17. });
  18. });
  19. output.listen(7000, '172.16.1.224');
  20. });
  21. input.listen(6999, '172.16.1.224');
  22.  
  23. net.createServer(function(from) {
  24. var to = net.createConnection({
  25. host: addr.to[2],
  26. port: addr.to[3]
  27. });
  28. from.pipe(to);
  29. to.pipe(from);
  30. }).listen(addr.from[3], addr.from[2]);
  31.  
  32. require httpmodule
  33. var http = require('http').createServer;
  34. app.listen(3000);
Add Comment
Please, Sign In to add comment