演示: https://fanhtml5.github.io/
原理很简单:先把网站资源上传到 IPFS,然后在前端用 Service Worker 拦截所有请求,把原始路径代理到 IPFS 的 HTTP Gateway 上。
所以,你看到的资源都是 Service Worker 虚拟出来的:) 实际这个站点只有两个文件: https://github.com/fanhtml5/fanhtml5.github.io
当然,目前只支持最新版的 Chrome。
细节还不怎么完整,负载均衡什么的也没实现,可以查看: https://github.com/EtherDream/decent-cdn