-
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
Using an Upgrader with libp2p-webrtc-star #650
Comments
Are you actually trying to customize the upgrader, or just pass wrtc to the webrtc-star constructor? We don't support customizing the upgrader, but it looks like you just need to customize webrtc-star. You can pass in options to the transport via the libp2p configuration, there is an example in the config readme for webrtc-star, https://github.com/libp2p/js-libp2p/blob/v0.27.8/doc/CONFIGURATION.md#customizing-transports. This will automatically handle passing the existing upgrader into the transport.
It won't. It does deprecate PeerInfo, so the constructor will slightly change, but this doesn't effect the functionality for forwarding transport config options. |
I think that we should improve the configurability of it per transport (maybe part of #576) and we should support a way of extending the upgrader current behaviour. In this case, we want to add config options on it. We should just get a easy way of doing it for now, and then use #576 to provide full support |
Thank you for this information!
I was on 0.27.7 as well, maybe that was part of it?
^^ good to know! I'll try again following this documentation. |
Update: I deleted my last comment - I do think things are working now. cheers, |
Can this be closed now, or is there a bug still? |
It can be closed - everything working on my end now. |
🎉 |
@vasco-santos is there a documentation change or update from this, or is the solution to fix #576? |
A per the discussion here: libp2p/js-libp2p-webrtc-star#218 (comment)
@vasco-santos asked me to file this issue to begin a discussion of how the
Upgrader
andwrtc
should be / can be configured in the latestlibp2p
while running an application in node,js.Type: Bug
Severity: High
Description:
Adding a
libp2p-webrtc-star
instance into a Transports module configuration requires anUpgrader
(instance? class?) - my clumsy attempt in this fork of IPFS examples: daviddahl/js-ipfs#1 best explains what I am attempting to do withlibp2p
on node.jsSteps to reproduce the error:
Clone the branch here: daviddahl/js-ipfs#1
cd js-ipfs/examples/custom-libp2p && npm install && node index.js
You should see:
If you comment out this line: https://github.com/daviddahl/js-ipfs/pull/1/files#diff-3160a5b56836421c3b48dcebbf951bd5R67 for
libp2p
to run but not consume thewebrtc-star
instance.I just noticed an
rc
release for0.28
, does it impact this functionality?The text was updated successfully, but these errors were encountered: