geut / discovery-swarm-webrtc

discovery-swarm for WebRTC
MIT License
94 stars 23 forks source link

Use metered.ca TURN servers in config #22

Open RangerMauve opened 2 years ago

RangerMauve commented 2 years ago

It would be useful to include the metered.ca TURN server config by default to improve reliability.

https://www.metered.ca/tools/openrelay/

 iceServers: [
    {
      urls: "stun:openrelay.metered.ca:80",
    },
    {
      urls: "turn:openrelay.metered.ca:80",
      username: "openrelayproject",
      credential: "openrelayproject",
    },
    {
      urls: "turn:openrelay.metered.ca:443",
      username: "openrelayproject",
      credential: "openrelayproject",
    },
    {
      urls: "turn:openrelay.metered.ca:443?transport=tcp",
      username: "openrelayproject",
      credential: "openrelayproject",
    },
  ],

Would a PR that adds this to the simple peer config be welcome?

tinchoz49 commented 2 years ago

Of course @RangerMauve, awesome idea!

homersimpsons commented 1 year ago

For the record, these TURN servers now require an authentication (free account). So it may not be relevant anymore to add those.