dat-gateway icon indicating copy to clipboard operation
dat-gateway copied to clipboard

DatArchive API

Open rjcorwin opened this issue 7 years ago • 5 comments

dat-fox uses dat-gateway under the hood to bring support for dat to Firefox, we're considering the same for Bunsen browser. However, something hot on our todo list is to add support for DatArchive API and thinking through this I've been starting to think it might make sense as an HTTP API that a DatArchive API polyfill can fall back to if a proper DatArchive API is not available like it is in Beaker Browser. If dat-gateway offered this HTTP API for DatArchive API polyfill to fall back to, this could enable DatArchive API in both Firefox and Bunsen.

Is this crazy? Fraught with danger?

rjcorwin avatar Apr 07 '18 11:04 rjcorwin

Aha! There is a conversation on this topic going on in the dat-fox issue queue https://github.com/sammacbeth/dat-fox/issues/1

rjcorwin avatar Apr 07 '18 11:04 rjcorwin

Working on it today. :D Hopefully I'll have something done by next weekend.

RangerMauve avatar Apr 08 '18 16:04 RangerMauve

You can check out my progress DatArchive API using the dat-gateway websocket PR I've got open.

https://github.com/RangerMauve/dat-archive-web

Is Bunsen browser still being actively developed?

RangerMauve avatar Apr 09 '18 20:04 RangerMauve

Is Bunsen browser still being actively developed?

@RangerMauve It is. We're incorporating some new node binaries at the moment in order to get broader device support across different chipsets. Also refactoring the server, considering using dat-gateway but probably not because of shared in browser memory access across all Dat archives. I'm experimenting with using subdomains of *.lvh.me to segment.

lvh-support

Discussion on security here.

rjcorwin avatar Apr 09 '18 21:04 rjcorwin

Awesome! I'm really excited to see it released in the playstore :D

I was thinking about setting up a public gateway that used dynamic subdomains which get proxies to the usual dat-gateway APIs. I was thinking of just using NGINX with some rules and a wildcard DNS from letsencrypt.

Didn't the android webrequest API allow for writing arbitrary data as a response without redirecting? Maybe you can get data directly from the nodejs bridge instead of setting up a server and redirecting?

RangerMauve avatar Apr 09 '18 22:04 RangerMauve