-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Add delegated routing to js-ipfs browser #2155
Comments
Some additional context: Enabling preload nodes as delegated routersIIUC if we want to reuse preload nodes as delegated routers, we need to prepare them first:
@mburns is working on it Wiring up
|
Added delegate routing config in #2195. For the go-ipfs preload node config, it would be fantastic if we could specify that configuration somewhere to make it easier for the community to run their own delegate routing nodes. Do we have the setup process for doing that @mburns ? I'd be happy to add it to the delegated routing module README's, and the libp2p example. |
For just IPFS, I used the notes from ipfs/kubo#5565, specifically: For our Production setup--with Nginx fronting for IPFS--we had to allow that URL path to be passed to the API endpoint, which is not the default backend (port
|
For the record, I was unsuccessful with Instead, some commands are hardcoded to just work on gateway port, some are not: $ ipfs config Gateway.APICommands --json '[]'
$ curl -I 'http://127.0.0.1:8080/api/v0/refs?r=true&arg=QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR'
HTTP/1.1 200 OK
$ curl -I -X POST 'http://127.0.0.1:8080/api/v0/dht/findpeer?arg=QmNsW4Dxk3Bcjc1ofu45wATsyK3HLGC38KZr5nN2NjNo6e'
HTTP/1.1 404 Not Found Update: |
I was able to use the API commands against IPFS master locally to get the delegate example working. I created a PR at js-libp2p to include the setup instructions. libp2p/js-libp2p#371 |
This issue is a child of Connectivity Magic #1459, and is intended to track the completion of the Delegated Routing portion of that.
Until browsers have the support needed to handle DHT queries quickly (direct dialing capabilities), delegated peer and content routing will be an important part of ensuring nodes are able to find peers and content.
js-libp2p already has support for custom content and peer routing modules. There are currently two modules that can leverage the IPFS api to achieve both. An example of this is at https://github.com/libp2p/js-libp2p/tree/v0.25.3/examples/delegated-routing.
TODOs
These are the necessary steps to adding delegated routing support to js-ipfs in the browser:
Refs:
The text was updated successfully, but these errors were encountered: