I have a problem which can probably be solved with some kind of port redirector which can redirect to different locations depending on client request content.
Here is the problem description :
I have one Windows application which is a kind of real-time TCP and HTTP server. In order for the client software to be able to connect to a server on the Internet without problems, the server must listen on ports HTTP (80) and HTTPS (443).
I want to host multiple software servers on the same computer which as only one public IP address. So, for example, if i have 2 software servers on this computer they will need to bind at the same time on ports 80 and 443 of the same public IP. AFAIK this is imposible.
I am currently looking for solutions in order to solve this problem.
One solution i imagine :
Note : The client software can communicate with the server both in TCP and HTTP, so i can use only HTTP in this case.
Make the software servers listen on internal IPs or on another port on the same computer. For example, server1 will listen on 10.1.0.1 and server2 on 10.1.0.2.
This way it is possible to use a reverse proxy which will listen on ports 80 and 443 of the public IP and redirect to the good internal server depending on the client request URL. For example, if the client send a GET
I tried with different reverse proxies (Apache, Squid, AT32 and a few others), and this always failed.
This failed because when the reverse proxy receive a request, says for
The problem is my application use HTTP to stream data. For the reverse proxy this is like big web pages which will never be complete. So this didn't work.
One solution to this problem will be to use a reverse proxy which does not wait for the internal page to be fully transfered before sending it back to the client. But currently i didn't found one !
They are problably other solutions too, i am open to your suggestions.
Thank you in advance