Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > General Coding
You last visited: Today at 14:35

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



TCP Proxy ports.

Discussion on TCP Proxy ports. within the General Coding forum part of the Coders Den category.

Reply
 
Old   #1

 
Mega Byte's Avatar
 
elite*gold: 0
Join Date: Dec 2009
Posts: 1,777
Received Thanks: 1,003
TCP Proxy ports.

A basic TCP port proxy can be used for nearly all TCP traffic? I dunno.
It was just an idea I had to help mitigate some ddos by having many servers and hiding the real ip of the server using this then we could monitor each one and filter or turn them off as needed etc.

Code:
var net = require('net');

function ProxyServer(localport, remoteip, remoteport) {
  if (remoteport === undefined) remoteport = localport;
  var server = net.createServer({
    allowHalfOpen: false,
    pauseOnConnect: false
  }, function connected(a) { //'connection' listener
    console.log('client connected '+localport);

    var b;

    a.on('end', function() {
      console.log('client disconnected '+localport);
    });


    var b = net.connect(remoteport, remoteip,
      function() { //'connect' listener
      console.log('connected to server '+remoteport);
      a.resume();
      a.pipe(b);
      b.pipe(a);
    });

    b.on('end', function() {
      console.log('disconnected from server '+remoteport);
      a.close();
    });
    
  });

  server.listen(localport, function() { //'listening' listener
    console.log('server bound '+localport);
  });

}

// Put your ports here
var ports = [****];
// Put your ip here
var serverip = '***.***.***.***';

var proxies = [];
for (var i=0;i<ports.length;i++) {
  var p = new ProxyServer(ports[i], serverip);
  proxies.push(p);
}

// TODO Clean exit.
Mega Byte is offline  
Reply


Similar Threads Similar Threads
[HOT] Ghost 1.1 Beta.Proxy IPgrabber,Hidemyass.com HMA Proxy-Tool,Nice,Free
12/11/2013 - Coding Releases - 6 Replies
]Hab nun seit langem an meinen Ghost! Proxy-Tool weiter gefeilt, ist eig nichts besonderes draus geworden, deshalb ist es ne Beta für die eig. 1.1 :P - nun kannst du dir Freshe IP:PORT's von Hide My Ass! Free Proxy and Privacy Tools - Surf The Web Anonymously ziehen und die auch gleich verwenden, natürlich kannst du auch deinen Favoriten manuell eingeben(siehe bild) - links führen zu hidemyass.com, geoiptool.comund speedtest.net - Proxy-Liste kannst du speichern - Lock, verhindert das...
Changing Ports / Proxy
09/13/2010 - Perfect World - 2 Replies
Hey epvpers, I have following problem: I wanted to play pwi in school, but they blocked the ports so i can't connect to the server... Is it possible to get a proxy server or change the ports from the game?
Metin2 DE Ports für Proxy
03/10/2010 - Metin2 - 6 Replies
Hi zsm Ich wollte in der Schule Metin2_De spielen, doch leider sind die Ports geblockt.:mad: Ich verwende Proxycap und YourFreedom. Weiss einer die Ports vom Torrent Patcher, und vom normalen Clienten? Gruss schui Edit: Hab Sufu gebraucht, hab aber nix gefunden
Find out the Ports/Ports herausfinden
11/14/2007 - Lineage 2 - 1 Replies
Wie finde ich die Ports von nem Server raus???



All times are GMT +1. The time now is 14:37.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.