-
Notifications
You must be signed in to change notification settings - Fork 445
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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: