-
Notifications
You must be signed in to change notification settings - Fork 453
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
libp2p-websocket-star #117
Comments
Interesting! Have you tried deploying it to an app and see how it works? |
I've now added it to mkg-tool and created a public signaling server at |
That's pretty cool, you probably want to add a specific multiaddr for it to not be confused with the webrtc-star transport :) |
This is going to enable a lot of people that want to use js-ipfs P2P like but are having troubles with WebRTC. @lgierth can we get one of the servers running hosted by us? |
What does it do? Can we just make it part of the regular websockets transport? |
It's a rewritten version of the libp2p-webrtc-star transport that creates the streams over the signaling server (socket.io) directly instead of over webrtc. |
I agree with @mkg20001. It has a different mechanism. |
I'm all for it -- but let's make sure this multiaddr scheme is correct, @diasdavid you mentioned in the past the webrtc-star scheme needs an overhaul because it doesn't correctly represent encapsulation. |
Yeah, here libp2p/js-libp2p-webrtc-star#110. Let's figure out this tomorrow over coffee ☕️ as proposed :) |
I've written a small solution For the client to listen on the multiaddr it has to provide the key (the random string). This way there can be multiple instances of the same peer-id online without having conflicts. The problem is when somebody tries to dial |
Worry not,
This is not an expected behavior. Only one PeerId per process, otherwise the feature of "process addressing" would be broken.
Given the following scenario:
The following dials should be valid and successful
The corollary being that the following dial is unsuccessful
|
So simply deny listening on the same multiaddr if something is already listening on it? Edit:
Someone could still listen on an address with an id that does not belong to him and (depending on whether we allow or disallow another peer to overtake that multiaddr while it's in use) the real peer couldn't listen on that addr or someone could overwrite/claim his listening address. |
The rendezvous point should not deny. It should just update the table. Nodes might roam from place to place. The verification is end to end |
My main issue is that with this simple patch (on libp2p-websocket-star, current master): diff --git a/src/index.js b/src/index.js
index dec40af..5576250 100644
--- a/src/index.js
+++ b/src/index.js
@@ -177,6 +177,7 @@ class WebsocketStar {
}
_peerDiscovered(maStr) {
+ this.firstListen.emit("ss-join", maStr)
log('Peer Discovered:', maStr)
const split = maStr.split('/ipfs/')
const peerIdStr = split[split.length - 1] every dial to every peer on the signaling server is redirected to the current node |
libp2p-webrtc-star hack: libp2p/js-libp2p-webrtc-star#116 |
Hey @mkg20001, would you move libp2p-websockets-star to the libp2p org? This will be a very useful transport for a lot of use cases and by making it part of the org just makes discoverability simpler and easier to maintain. I'll be updating today how multiaddrs work for libp2p-webrtc star as decided in https://github.com/ipfs/pm/pull/492/files |
@diasdavid Of course I can do that as long as I keep permissions for the repository. |
absolutely, I'll add you to the team that manages the repo :) Wanna migrate it to me so that then I can move to the libp2p org (Github doesn't allow users out of the org to move repos in), I'm looking to work on it this weekend. Enjoy the time with the family! :) |
@diasdavid I've moved the repo to your account. Can you move it to libp2p and add me as a repo admin? |
Done! Thank you @mkg20001 :):) |
Let's continue the discussion on the module itself :) |
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
## [1.1.5](libp2p/js-libp2p-webrtc@v1.1.4...v1.1.5) (2023-04-13) ### Dependencies * bump it-pipe from 2.0.5 to 3.0.1 ([#111](libp2p/js-libp2p-webrtc#111)) ([7e593a3](libp2p/js-libp2p-webrtc@7e593a3)) * bump protons-runtime from 4.0.2 to 5.0.0 ([libp2p#117](libp2p/js-libp2p-webrtc#117)) ([87cbb19](libp2p/js-libp2p-webrtc@87cbb19)) * **dev:** bump protons from 6.1.3 to 7.0.2 ([libp2p#119](libp2p/js-libp2p-webrtc#119)) ([fd20f4f](libp2p/js-libp2p-webrtc@fd20f4f))
I have created a module called libp2p-websocket-star that works similar to libp2p-webrtc-star just without webrtc.
What do you guys think?
The text was updated successfully, but these errors were encountered: