ipfs / notes

IPFS Collaborative Notebook for Research
MIT License
402 stars 31 forks source link

Idea - Create seems less IPFS website #367

Closed Jorropo closed 5 years ago

Jorropo commented 5 years ago

Today sharing a "website" in IPFS is easy and possible, but you have a very bad point. Ipfs link are ugly, even dnslink, (dnslink is super but this look strange). So I got an idea. Create seems less ipfs website. So you access :

https://example.com/random_resources.html

But in real is A and/or AAAA resolve through a CNAME to idealy gateway.example.com or for low cost randomPublicIPFSGateway.org. So the ipfs gateway receive the http request. It compare the host header with a list of associated, this list contain a list of all domain where the gateway is present, so if the domain is finded in this list serve regular public gateway, else continue here. (This list can be edited in the configuration file). Then the ipfs gateway do a dnslink on the received domain. (so here example.com) If finded return the corresponding ipfs resource :

ipfs://[QM HASH finded with dnslink]/asked_file

as

https://example.com/asked_file

What potential problems of this ? (if you see one not pointed here, tell me, it will be added (with mention evidently))

Stebalien commented 5 years ago

We actually do exactly this. This is how we, e.g., serve our own websites.

The only tricky part is HTTPS. If someone wants to use our gateways for https://yourdomain.com, we'd need an SSL cert. We could create them on the fly with Let's Encrypt but we'd likely run into rate-limiting issues (and potentially ToS issues).

Jorropo commented 5 years ago

oh, ok :)

Jorropo commented 5 years ago

@Stebalien sorry for the delay but can you link me a doc to do this pls ?

Stebalien commented 5 years ago

Unfortunately, the best documentation on this isn't ours: https://developers.cloudflare.com/distributed-web/ipfs-gateway/connecting-website/

Fortunately, it's quite good.

Jorropo commented 5 years ago

@Stebalien ok thx, all have been said, I'm closing.