logoalt Hacker News

owaiswiztoday at 6:30 PM1 replyview on HN

In case a direct p2p connection is not possible and it goes through the relay, is that for all traffic (even if encrypted )?

And who bears the cost for that (or does it have some FUP) (bandwidth cant be free/unlimited?)


Replies

narragansetttoday at 6:56 PM

Yes -- if direct P2P fails, everything rides the TURN relay that gets inserted automatically -- it's DTLS end-to-end so the relay only sees ciphertext, never plaintext or the access code.

On cost: I pay for it on bitba.ng and it's capped right now at 10 minutes per connection (mostly to prevent people from connecting and walking away). But you're not stuck with mine -- the signaling server is open source, so you can self-host and point it at your own TURN. The Python library supports "bring your own TURN" by specifying (--turn-url, --turn-user, --turn-credential); adding the same flags to the CLI is a small gap I need to close. There are TURN providers that have reasonably generous free tiers.

show 1 reply