sammacbeth / dat-fox

dat:// protocol as a Firefox webextension
MIT License
248 stars 12 forks source link

Consider using experimental WebExtension API for custom protocol implementation #18

Open Gozala opened 6 years ago

Gozala commented 6 years ago

Hi @sammacbeth

I have being pursuing an effort of implementing experimental WebExtensions APIs so that dat, ipfs, ssb and other dweb protocols could be implemented and add-ed to firefox via add-ons. Here is the repository for this project https://github.com/mozilla/libdweb

I am also looking trying to get community behind this effort. Right now feedback from authors like yourself would be invaluable. Right now theres'n not much to try other than Protocol Handler API, but it's also a think that likely can utilized by dat-fox to provide native dat:// urls and a good test case to asses if combination of protocol handler + native messaging would enable a better experience.

If you are able and interested to try this out that would be amazing & I'm happy to assist in any way I can.

Thanks!

willemneal commented 5 years ago

Glad I just found this! I'm going to try it out! @Gozala I know this isn't the best place to bring it up, but how can an extension export/import my firefox metadata so that I can say upload it to dat etc.?

My biggest feedback is have an identity API, so that there is one offered through users' mozilla accounts but also other identity vendors can create various extensions. This will help create a marketplace for identity systems and hopefully they can become interoperable.

Another one that would be great from a security standpoint adding the Messaging Layer Security (MLS) Protocol, which could be provided as an extension with the current setup. However, given that almost every P2P network seems to reinvent the task of creating a secure connection some will fail. I couldn't imagine if every site had to implement TLS.

Gozala commented 5 years ago

Glad I just found this! I'm going to try it out! @Gozala I know this isn't the best place to bring it up, but how can an extension export/import my firefox metadata so that I can say upload it to dat etc.?

I assume you’re referring to profile data. It doesn’t seem that web extension have api for that, but I’m pretty sure there should be some https based api as firefox sync works across desktop and mobile apps so in wors case it should be possible to sync through that API although admittedly that seems wrong if both code and data is on that machine.

That being said I think out of the scope for libdweb project and probably best to discuss with web extensions team.

My biggest feedback is have an identity API, so that there is one offered through users' mozilla accounts but also other identity vendors can create various extensions. This will help create a marketplace for identity systems and hopefully they can become interoperable.

Identity & access management is something that comes up fairly often. Sadly mostly it’s in a form of a wish that browsers would have aolved it, but no one yet had proposed with something concrete. I’d encourage you to create an issue on libdweb repo to have discussion on what the goals of that API should be, what it would enable and would it look like.

I should also mention that we’re thinking about identity in dweb space along with bunch of other projects like uport, jolocom But it’s somewhat unclear what that will be like or how coupled it will be with specific protocol. libdweb explicitly wants to enable protocols to experiment rather tgan pick a winner or force specific solution. If we can figure out building blog useful across protocols I’d be siper excited.

Another one that would be great from a security standpoint adding the Messaging Layer Security (MLS) Protocol, which could be provided as an extension with the current setup. However, given that almost every P2P network seems to reinvent the task of creating a secure connection some will fail. I couldn't imagine if every site had to implement TLS.

That is interesting, I have not heard of MLS and it’s difficult to me to assess if ipfs, dat, ssb will be all onboard with idea of using it, if so that sould be a huge win and I’m happy to work with everyone to make it available, although it might make more sense as library on npm instead of WebExtensions API. In fact if something can be done as npm library I’d highly recommend that option as it’s far easier to test maintain and ship both in WebExtension and elsewhere. Again I would invite you to start discussion on this either on libdweb issue or on IRC channel.

P.S: I think comparison to implementing TLS per site is imprecise as it’s usually p2p network protocol implementors choose to roll out their own MLS not the apps using.

P.P.S: I do agree with a general sentiment though and I hope eventually these protocols will be able to converge onto same networking stack and concentrate on differences in the layer above.