Working example on Github with 80 and 443 ports only?

Our users has limited internet access to tcp ports 443 and 80 only nothing else is possible to open for them (even udp access).
I saw this topic but didn’t see any example anywhere how exactly setup and configure mediasoup to work only with 443 and 80 tcp ports (is not possible to open ports range for rtc)?
Any advice or suggestion where to get started? Ideally if someone could provide source code example on Github or any other public repository.

You need a TURN server for this. It essentially acts as a proxy server between port 443 and a WebRTC destination (mediasoup).

This package is easier to understand than coturn but does not support TLS:

Thanks, I will have a look.

You configure your STUN / TURN servers on your clients via the Client API. device.createRecvTransport() and device.createSendTransport() both accept the transportOptions parameter, and one of its properties, ‘iceServers’, is an array of RTCIceServer objects. If you omit that parameter then everything uses MediaSoup’s ICE Lite mode. But that mode isn’t friendly to restrictive enterprise firewalls.

I use the free tier of STUN / TURN servers from the STaaS (yeah, guess what that acronym means) for testing. The iceServers property value they give me from their API is is this. You’ll need your own account credentials.

STUN is a super-cheap service to provide so there are some freely available servers for it. But TURN is more costly: those servers relay (receive and send) media data. So, typically we pay for that service, or stand up our own TURN servers. I’m too lazy to do the latter, hence


I have a hack of mediasoup-sandbox here that does this. There’s a function at the end of server.js to access Xirsys’s API.

1 Like