Skip to content

PoC of WebRTC signalling exchange through @waku/noise #186

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

Merged
merged 11 commits into from
Jan 27, 2023
Merged

Conversation

weboko
Copy link
Contributor

@weboko weboko commented Jan 18, 2023

Showcasing establishment of RTC connection through Waku Noise.

This PR TODO:

  • prettify code

WebRTC TODO:

  • handle STUN (offer/answer) in a decentralised way: https://github.com/libp2p/specs/tree/master/identify#the-identify-message. Essentially there should be a way to gather info from the network about particular client and build STD string without involving some central server.
  • signalling server (TURN) to allow two clients to communicate even if NAT does not allow so. Worst case we can just send messages through Waku :)
  • create NoiseRTC abstraction to manage RTC connection and initiate it trough Noise data channel.

Covers waku-org/js-waku#20

@weboko weboko marked this pull request as ready for review January 25, 2023 00:52
@weboko weboko requested a review from fryorcraken January 25, 2023 00:53
Copy link
Collaborator

@fryorcraken fryorcraken left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a README to clarify the purpose of this example and its state (work in progress)
Also, is there a way to get more feedback that the RTC connection is successful? I guess checking the about:webrtc tab helps.

Finally, currently need to confirm an auth code on both side.

However, in a scenario where I know the peer id of the other peer, meaning they can prove their identity by signing a message with their private key, can we skip the authocode check? Or, is that scenario not catered for yet in the RFC?

Because in the case of using webrtc to setup more connection between browser node, I do not expect manual/human intervention (note that the remote peer address is expected to be retrieved in a ENR form which is signed).

Cc @kaiserd @richard-ramos

@weboko weboko merged commit 95d13a5 into master Jan 27, 2023
@weboko weboko deleted the weboko/noise-rtc branch January 27, 2023 22:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants