I am using angular, js-ipfs and links from cloudflare.
I am getting data from IPFS in two ways:
First: ipfs.cat(cid)
,
Second: https://cloudflare-ipfs.com/ipfs/{{ cid }}
Thing is sometimes I get data from both cloudflare and ipfs.cat but occasionaly only cloudflare returns images and ipfs.cat has 502 Error, and next time I get data from ipfs.cat and cloudflare images are empty. I run browser ipfs node, and I do not have owned ipfs preload node served from any VPN backend application.
Please take a look on my create() method. Also help me with stabilisation IPFS connection,- what should I do more? I have possibility to make own ipfs node on VPN, but it will make any difference? Also I do not want to use any Pinata or Infura IPFS providers.
Below I attached my create method:
this._createIPFSNodePromise = create({
config: {
Addresses: {
Gateway: 'https://cloudflare-ipfs.com/ipfs/'
},
Swarm: {
ConnMgr: {
LowWater: 100,
HighWater: 500,
},
DisableNatPortMap: true
}
},
preload: {
enabled: true, // preload by default, unless in test env
addresses: [
'/dns4/node0.preload.ipfs.io/https',
'/dns4/node1.preload.ipfs.io/https',
'/dns4/node2.preload.ipfs.io/https',
'/dns4/node3.preload.ipfs.io/https'
]
}
})