Send media between two servers on different machines

Currently our team is working toward a solution to the problem of sending a stream from producer to a customer where they are on different machines. The solution that I develop first could establish connection and exchange media between two clients through the central router, but they only work when two clients are on the same machine as the router. When they are on different machine (I change URL of io function to the IP of the machine), they still establish the connection perfectly, but there is no data transfer in between. For example, I want to send live media from https:// [ip1] to https://[ip2]. I refer to this source to develop. Hope that you could provide some intuition.