I am looking for a server software that can create TCP routes between pairs of users.
The use case is the following: There are devices that can communicate via TCP in a proprietary protocol. Because both devices are behind firewalls a direct communication is not possible. What I want is solution where a server acts like a man-in-the-middle. On a certain signal both devices connect to the server and can send TCP messages. The server routes the messages to the other device and vice versa. For both devices it feels like there is a direct connection after the initialization.
The server should be able to handle many connection pairs at one. Ideally the opening and closing of the channels should be controllable via an API like a REST-API. Also, the devices should be able to do some form of authentication like password.