deps(transport-webrtc): replace node-datachannel#3544
Open
mertushka wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Replaces
node-datachannelwith @mertushka/webrtc-node in@libp2p/webrtc.@mertushka/webrtc-nodeis a Node.js WebRTC binding that exposes a W3C-compatible WebRTC API surface instead of a package-specific polyfill surface. Version0.2.0passes 620 strict Web Platform Tests for WebRTC API behavior and provides the standard objects@libp2p/webrtcalready uses in browsers, includingRTCPeerConnection,RTCDataChannel,RTCSessionDescription,RTCIceCandidate,RTCCertificate, and standardEventTargetbehavior.This is useful here because the existing Node path had to wrap
node-datachannelAPIs to inject ICE credentials, map ICE servers, import certificates, work around stale data channel state, and force native peer connection cleanup. With@mertushka/webrtc-node, the Node path can use the standard WebRTC-shaped APIs directly, with explicitnonstandardhooks only where WebRTC Direct needs Node-specific control over ICE credentials, certificate import, UDP muxing, fingerprint verification, and remote fingerprint access.This removes the node-datachannel-specific compatibility layer and related runtime workarounds now that the replacement exposes the required standard WebRTC APIs plus the nonstandard APIs used by the WebRTC Direct path.
Changes include:
node-datachanneldependency with@mertushka/webrtc-nodenonstandardAPIs:configurePeerConnectionimportCertificatesetLocalIceCredentialsgetRemoteFingerprintIceUdpMuxListenerRelated open PRs
Potentially Fixes/Closes:
Likely requires a rebase:
Verification
npm run dep-check -w @libp2p/webrtcnpm run build -w @libp2p/webrtcnpm run test:node -w @libp2p/webrtc -- --exitnpm run test:chrome -w @libp2p/webrtc