Skip to content

A TCP 4 Socket Tunnel, to be used for creating multiple endpoints for a simple server or load balancing.

Notifications You must be signed in to change notification settings

Sean-Bradley/CPPTCP4SocketTunnel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 

Repository files navigation

CPPTCP4SocketTunnel

A TCP 4 Socket Tunnel, to be used for creating multiple endpoints for a simple server or load balancing.

IF you start a socket server using my CPPMultiThreadedLowLatencyTCPSocketServer on one ip address,

and you want to hide that ip from the rest of the world, or create a load balancing solution,

you can start up a CPPTCP4Socket tunnel on another server, and expose that endpoint to your desired clients.

eg,

                                                             / Client 1
                                          
                             ---Tunnel 1 (192.168.1.2:8080) {   Client 2
                             
                           /                                 \  Client 3
                           
                         /

Server (192.169.1.1:8080) {

                        \
                        
                         \                                  /  Client 4
                         
                          ---  Tunnel 2 (192.168.1.3:8080) {   Client 5
                          
                                                            \  Client 6

Have as many tunnels as you want.

Use what ever ports you want,

Actually, use the tunnel for what ever you want.

To compile on linux

g++ TCP4Tunnel.cpp -pthread -std=c++11 -o SeansTCP4Tunnel

to run

./SeansTCP4Tunnel [local listen port] [destination ip] [destination port]

test using either the supplied tcp client in the other repository, or simply just telnet

About

A TCP 4 Socket Tunnel, to be used for creating multiple endpoints for a simple server or load balancing.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages