tom-james-watson / p2p.chat

p2p video conferencing powered by WebRTC.
MIT License
686 stars 134 forks source link

hosting over dat #3

Closed roscoevanderboom closed 2 years ago

roscoevanderboom commented 5 years ago

would it be possible to host this app over dat? using beaker browser.

tom-james-watson commented 5 years ago

Hello,

The frontend is a simple static site, so hosting the frontend would be possible yes. However, you still need to be able to communicate between two clients, so you'd still need to use a signalling server (signalhub in our case).

I believe Beaker prevents you from making calls to third-party origins, no? OK, just looked into it and you can make GET requests, but not POST requests, so signalhub is not going to work on Beaker.

The only way I can think of being able to go dat-only would be to use the upcoming multi-writer dat feature to initialise the webrtc connection instead of a signalhub. However, the host would first need to paste a long URL to the client, then the client would need to paste back their own local key to be authorised to write to the multi-writer dat. Not great UI, but should at least be possible.

roscoevanderboom commented 5 years ago

It should be possible, is good enough for me :P I'll ask around and see if someone at Beaker would be interested in taking a look at this. I'm not a coder, just a huge fan of decentralization.