feat: add node.js/electron support for webrtc transport#1905
Conversation
…rivate-to-public) Uses [node-datachannel](https://www.npmjs.com/package/node-datachannel) to adds support for node.js to @libp2p/webrtc. Supports: - Dialing private-to-private - Listening private-to-private - Dialing private-to-public Does not support: - Listening private-to-public
maschad
left a comment
There was a problem hiding this comment.
Great work on this! I left some comments.
|
@achingbrain : Thanks! Will there be a corresponding PR to add this to test-plans/interop? |
Currently we have removed the webRTC tests from interop due to libp2p/test-plans#235 - which I will be resuming work on this week. Once that is resolved we can add this to suite and re-introduce the tests. |
maschad
left a comment
There was a problem hiding this comment.
LGTM! There's some follow up work to be done given that murat-dogan/node-datachannel#171 is merged, once v0.4.4 is released.
|
Added in libp2p/website#180 @BigLep |
|
I came across this while trying to figure out why my nodejs node wasn't advertising a webRTCDirect listening multiaddr. Spent too much time before learning webRTC wasn't supported in node, just the browser so far. But I'm curious about your statements "Listening private-to-private" & "Listening private-to-public", does this mean a public node can't listen on |
|
No, this PR only adds support for private WebRTC addresses (e.g. the SDP handshake needs to take place via a relay server). It should be possible to support this in future, I've opened a draft PR here but we need some features adding to the underlying libraries. |
|
@achingbrain Does it support private (nodejs) - private (browser)? I'm trying but can't connect webrtc between nodejs (private) and browser through relay |
Uses node-datachannel to add support for node.js and electron (main process) to @libp2p/webrtc.
Supports:
Does not support: