buckyos / cyfs-browser

BSD 2-Clause "Simplified" License
5 stars 1 forks source link

Add support for ipns and ipfs #7

Closed weiqiushi closed 1 year ago

weiqiushi commented 1 year ago

CYFS Browser can integrate IPNS and IPFS protocols like cyfs protocol: proxy ipns:// schema to http://localhost:38090/ipns, proxy ipfs:// schema to http://localhost:38090/ipfs

then cyfs-runtime can deal with them :)

glen0125 commented 1 year ago

Already supported

lurenpluto commented 1 year ago

Already supported

How is this going to work? If such support is added, it would be nice to post some design-related documentation, at least how to use it or something

weiqiushi commented 1 year ago

Similar to the interaction logic of cyfs-runtime, CYFS Browser will start another proxy program called " ipfs-proxy", which will listen to a local proxy port and will start kubo (https://github.com/ipfs/kubo) as the real ipfs backend

When CYFS Browser encounters the ipfs and ipns protocols, it converts them to the local proxy port started by ipfs-proxy, and this program then forwards them to the kubo backend and returns the results.