TCP PortReRouter is a basic network service that proxies TCP sockets to/from an alternate IP and/or an alternate port. ALPHA RELEASE
SSL is not supported as SSL implements IP validation.
Despite the 2.0 version reference (this being due to a rewrite in C# from a mostly working VB6 implementation), this is not reliable nor stable software, it is experimental, working perfectly only in the most trivial of tests, and as such any assists in debugging and improvement are welcome.
To configure TCP Port ReRouter, you must edit the TcpPortReRouterService.exe.config file if running as a Windows service or the TcpPortReRouter.exe.config file if running the console application.
<?xml version="1.0" encoding="utf-8" ?>
<section name="portRerouter" type="TcpPortReRouter.RouteMapConfiguration, TcpPortReRouter"/>
<!-- listen on the primary IP on port 89, redirect to www.google.com on port 80 -->
<add name="www.google.com on port 89" listenPort="89" targetHost="www.google.com" targetPort="80"></add>
<!-- listen on the loopack adapter, redirect to www.google.com's IP address on port 80 -->
<add name="www.google.com on loopback @ port 89" listenIP="127.0.0.1" listenPort="89" targetHost="126.96.36.199" targetPort="80"></add>
To run the console application just start TcpPortReRouter.exe.
To install the Windows service run installutil.exe from one of the framework runtimes in C:\Windows\Microsoft.NET\ with the path to TcpPortReRouterService.exe as the argument. The "/?" help output will describe how to use it. If you do not know which directory to invoke it from, I normally use this as my preference guide based on availability, based on whether I have an x64 OS or have .NET 4.0 installed, with most preferred first:
- C:\Windows\Microsoft.NET\Framework64\v4.0.30319\installutil.exe (64-bit, .NET 4.0)
- C:\Windows\Microsoft.NET\Framework64\v2.0.50727\installutil.exe (64-bit, .NET 2.0; Note: the project is compiled for .NET 4.0, but can theoreticaly be recompiled to the 2.0 CLR runtime as .NET 3.5)
- C:\Windows\Microsoft.NET\Framework\v4.0.30319\installutil.exe (32-bit, .NET 4.0)
- C:\Windows\Microsoft.NET\Framework\v2.0.50727\installutil.exe (32-BIT, .NET 2.0; Note: the project is compiled for .NET 4.0, but can theoreticaly be recompiled to the 2.0 CLR runtime as .NET 3.5)
Another obvious note, only run installutil.exe once. Don't try to run it once for each of the runtimes listed. There is only one Windows services registry. ;)
Care to donate?
Buy me a coffee.
Seriously, sitting at Starbucks with my laptop producing this is the way I spent my vacation.
About the author
Visit my web site: http://www.jondavis.net/