I have been working on a video chat application using WebRTC
and using Java Websocket
as a Signalling server.
This application is working successfully on Tomcat
.
Currently I am using Google's STUN server.
var pc_config = {"iceServers": [{"url": "stun:stun.l.google.com:19302"}]}; var pc = new RTCPeerConnection(pc_config);
I don't want to relay on a public or 3rd party STUN server, like above.
Since my application will be published to public Tomcat server with dedicated domain. I want use/setup my own STUN or TURN server.
Can I do that with Tomcat?
Are there any stable open-source libraries available for this?
Please point me to an example if any such.
I think trying to cram signaling and NAT traversal (=STUN/TURN server) is the wrong approach. The way you handle scaling with them are different, and the surface of each that you end up exposing towards the open internet is also different.
Due to these reasons, there's no real problem of using a different language/tech for the STUN/TURN server. I'd go with either coturn or restund here.
There are also a few managed commercial services you can use instead of deploying your own, and they really aren't expensive.
The better way is to use an open source solution as a service on your server. Example: https://github.com/coturn/rfc5766-turn-server/ - it is functional and stable, supports additional features.
AFAIK, there are no Java STUN/TURN libs that can work under Tomcat. Although, there are some open source Java-based projects, like this one: https://github.com/jitsi/turnserver
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With