As chance would have it I've recently implemented a Turn client and a STUN client.

Turn = a way to proxy UDP or TCP cons from host A to host B.

STUN = a protocol that shows what your externally mapped port and IP is. From this you can inter what NAT type you have if any.

My understanding is that when it comes to WebRTC, the thing that glues everything together is 'ICE' which decides where to get information from, what candidates to use, what strategy to use to connect. So in other words there is a server you use to exchange candidates? I am curious because I don't see how Turn or STUN by itself would be that useful for WebRTC and the project page doesn't mention Ice?

Are your TURN and / or STUN implementations publicly available?

There are also nice existing FOSS implementations:

(Golang) Pion TURN - https://github.com/pion/turn

(Rust) Port of Pion TURN - https://github.com/webrtc-rs/turn and https://webrtc.rs/

(Rust) TURN server and client - https://github.com/sile/rusturn

(Python) TURN Server - https://github.com/m32/sturn

(Javascript) Node.js TURN server - https://github.com/Atlantis-Software/node-turn

(C) TURN server - https://github.com/Atlantis-Software/node-turn

Additional reading if you care to refresh on WebRTC terminology like STUN, TURN, ICE, etc:

https://developer.mozilla.org/en-US/docs/Web/API/WebRTC_API/...

https://www.twilio.com/docs/stun-turn/faq