I seek to implement the following connection logic:
In order to get through their routers/NAT and connect via WebRTC, web browser clients first connect to a server to have holes punched in their firewalls.
That server keeps a list of the public IPs and open ports of all connected browsers.
Every connected browser can request that list and directly connect to others without the server knowing who connected with whom.
The core part is the requirement that (for the sake of privacy) the server must not be able to determine which pairs of browsers are connected.
Can this be achieved with the JavaScript WebRTC API provided in modern web browsers?
I am certain that this is possible with any client that provides direct access to the UDP protocol, but I assume web browsers won't allow that, in the same way that they enable HTTP and WebSocket connections but don't allow forming raw TCP connections.
In case the given logic can indeed be implemented in the browser, a secondary question would be if multiple connections can be handled using the same hole, or if any new browser-browser connection requires a new roundtrip to the server for hole punching.