icidasset / diffuse

A music player that connects to your cloud/distributed storage.
https://diffuse.sh
Other
808 stars 67 forks source link

Host diffuse on IPFS #341

Closed Winterhuman closed 2 years ago

Winterhuman commented 2 years ago

Diffuse is a static application, and it has support for IPFS within itself, but, to use it on the web you either need to selfhost it or go to https://diffuse.sh. What about hosting diffuse on IPFS and linking the resulting CID here? (Or, maybe consider Cloudflare's support for DNSLink so you could make https://diffuse.sh point to a CID/IPNS address)

Please say if this isn't trivial to implement given the current hosting setup.

icidasset commented 2 years ago

Hey 👋 Diffuse is actually hosted on IPFS, it's hosted on the gateway from https://fission.codes and routed through Cloudflare.

So, diffuse.sh has this DNSLink dnslink=/ipns/diffuse.fission.app and thus redirects to dnslink=/ipfs/bafybeidn5idk7u54lcg3ngtm52upbywldyklimpdykeabb3kc6qrnytnni

See https://dnsrecords.io/_dnslink.diffuse.sh and https://dnsrecords.io/_dnslink.diffuse.fission.app

(Same thing for nightly.diffuse.sh)

Winterhuman commented 2 years ago

Oh sweet, I never realised. How come diffuse.sh points to diffuse.fission.app instead of directly pointing to the IPFS address?

Winterhuman commented 2 years ago

I'll close the issue since this is already in place then

icidasset commented 2 years ago

Oh sweet, I never realised. How come diffuse.sh points to diffuse.fission.app instead of directly pointing to the IPFS address?

That's a good question. I could use Fission's nameservers directly, but then I'd lose the ability to define custom DNS records. Instead I'm using Cloudflare's IPFS gateway to do the routing for me, and I can still manage my DNS records. Sadly I think this approach might be slower, so I should probably experiment.

More info: https://guide.fission.codes/developers/custom-domains