Skip to content

Compatibility with Cloudflare Calls (TURN & STUN servers) #12394

Description

How to use GitHub

  • Please use the 👍 reaction to show that you are interested into the same feature.
  • Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
  • Subscribe to receive notifications on status change and new comments.

Feature request

Which Nextcloud Version are you currently using: (see administration page)
Latest (28.0.5)

Is your feature request related to a problem? Please describe.
Right now selfhosted TURN & STUN performance aren't great even with a top of the line server, 32 core & more, i often find myself glitched out in calls with my team. That's why when we saw a high performance low latency alternative like Cloudflare calls it would just make sense.

Describe the solution you'd like
Integration of Cloudflare Calls TURN service into Spreed.
It require a curl to their server like the following:

curl -X POST \
$TURN_SERVICE_API_TOKEN" \
	-H "Content-Type: application/json" -d '{"ttl": 86400}' \
$TURN_SERVICE_ID/credentials/generate

And would answer the credential for each user in Spreed (if they have different ip)

{
  "iceServers": {
    "urls": [
      "stun:stun.cloudflare.com:3478",
      "turn:turn.cloudflare.com:3478?transport=udp",
      "turn:turn.cloudflare.com:3478?transport=tcp",
      "turns:turn.cloudflare.com:5349?transport=tcp"
    ],
    "username": "XXXXX",
    "credential": "YYYYY"
  }
}

and as a last step, if the creds are valid, it return the turn & stun connection to use & work with.

const myPeerConnection = new RTCPeerConnection({
  iceServers: [
    {
      urls: "stun:stun.cloudflare.com:3478",
    },
    {
      urls: "turn:turn.cloudflare.com:3478",
      username: "REPLACE_WITH_USERNAME",
      credential: "REPLACE_WITH_CREDENTIAL",
    },
    {
      urls: "turns:turn.cloudflare.com:443?transport=tcp",
      username: "REPLACE_WITH_USERNAME",
      credential: "REPLACE_WITH_CREDENTIAL",
    },
    {
      urls: "turn:turn.cloudflare.com:3478?transport=tcp",
      username: "REPLACE_WITH_USERNAME",
      credential: "REPLACE_WITH_CREDENTIAL",
    },
  ],
});

I hope such feature would come available in a "near" future :D It would be so great.

Have a nice day ^^

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions