C++ TCP Proxy Server

 www.partow.net  .: Home :.   .: Links :.   .: Search :.   .: Contact :. 


Description

The C++ TCP Proxy server is a simple utility using the ASIO networking library, for proxying connections from external clients to a specific server. The TCP Proxy server can be used to easily and efficiently:

  • Limit the number of client connections to the server
  • Load balance client connections between multiple server instances
  • Provide IP or connection time based filtering and access control mechanisms

TCP Proxy Server Diagram - Copyright Arash Partow


Example Use-Case (Simple Proxy Server)

A simple scenario is as follows: There exists a server at 192.168.0.100 that accepts connections on port 20000, however due to firewall rules external clients can only access a host at 192.168.20.200 on port 8080 (eth0), which coincidentally has access to the 192.168.0 network segment via a second NIC (eth1). A solution for allowing the external clients access to the server is to run the TCP proxy server on the host at 192.168.0.200 with the following configuration:

tcpproxy_server 192.168.20.200 8080 192.168.0.100 20000

C++ TCP Proxy License

Free use of the C++ TCP Proxy is permitted under the guidelines and in accordance with the Boost Software License


Compatability

The C++ TCP Proxy implementation is compatible with the following C++ compilers:

  • GNU Compiler Collection (3.4+)
  • Intel® C++ Compiler (9.x+)
  • Microsoft Visual Studio C++ Compiler (8.1+)

Download






Copyright Arash Partow