You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the RTC configuration can only be set at the time of construction of the WebRTCTransport. While this is typically fine for STUN servers and the like, TURN servers often have credentials which are limited in their lifetime. For libp2p peers which are long lived, the peer (and thus the Transport instance) may outlive the validity of the TURN credential.
Since the initially provided credential is used each time the 'dial' method is called on the transport, eventually the Transport will not be able to request TURN candidates.
Steps to reproduce the error:
Leverage any common TURN service such as Twilio, Cloudflare, Metered.ca, etc
Request a credential with a short lifetime (eg 180 seconds)
Create a libp2p instance with a WebRTCTransport including the provided TURN credentials
Observe that TURN cadidates are no longer available after the libp2p instance lifetime exceeds the credential lifetime
The text was updated successfully, but these errors were encountered:
Version:
"libp2p": "^1.2.4",
"@libp2p/webrtc": "^4.0.22",
Platform:
Linux master 6.8.6-arch1-1 #1 SMP PREEMPT_DYNAMIC Sat, 13 Apr 2024 14:42:24 +0000 x86_64 GNU/Linux
Subsystem:
WebRTCTransport
Severity:
Medium
Description:
Currently, the RTC configuration can only be set at the time of construction of the WebRTCTransport. While this is typically fine for STUN servers and the like, TURN servers often have credentials which are limited in their lifetime. For libp2p peers which are long lived, the peer (and thus the Transport instance) may outlive the validity of the TURN credential.
Since the initially provided credential is used each time the 'dial' method is called on the transport, eventually the Transport will not be able to request TURN candidates.
Steps to reproduce the error:
The text was updated successfully, but these errors were encountered: