+ Code repo for this demo + on Github +
++ The idea is to publish from js-ipfs so you control your own + private keys, but publish to go-ipfs to benefit from the DHT. + Since the DHT in js-ipfs isn't working yet, we need to use PubSub + and have a go-ipfs node subscribed to that PubSub to get our IPNS + record onto the DHT. In order to use PubSub between these two + nodes, you'll need a websocket to connect them. +
+-
+
-
+ 1. Access to a go-ipfs node and it's API, a-la
+
/dns4/domain.com/tcp/5001
+
+ - + This is how the demo talks to the server, to ensure things + like: + +
- + A) pubsub is enabled, { EXPERIMENTAL: { ipnsPubsub: true } } + and --enable-pubsub-experiment + +
- + B) go-ipfs is connected to the js-ipfs node in the browser, + via node.swarm.peers(), + +
- + C) the pubsub messages are getting through to the go node, + via node.pubsub.subscribe(). + +
-
+
-
+
-
+ 2. Access to a go-ipfs Websocket port, a-la
+
/dns4/domain.com/tcp/4003/wss/p2p/QmTheDomainPeerId
+
+ - + Since we need PubSub for IPNS to reach the go-IPFS node (and + further replicate through the go-DHT network) we need to + connect our pubsub enabled JS-IPFS node in the browser to our + go-IPFS node on the server. The way we connect is via + Websocket. See + this example + for reference. + +
+ Once we can talk to go-IPFS and we're connected via Websocket, + then we can publish in our browser node, have the pubsub push it + to the go-IPFS server, and then check with the server that it's + confirmed as published. Once it's on the go-IPFS node it should + replicate throughout the rest of the DHT amongst the go-Nodes. +
+