reform-org / reform

Local First HiWi Management Tool
https://reform.st.informatik.tu-darmstadt.de/
Apache License 2.0
6 stars 2 forks source link

[US] Make WebRTC work over the internet #165

Closed mohe2015 closed 1 year ago

mohe2015 commented 1 year ago

Estimated story points: 13

Description

As a user I want to connect to other users over the internet and not only on local network. # Acceptance criteria

Remote connections over the internet work. The connections work correctly with symmetric NAT, by passing them through a proxy. The proxy is authenticated and the credentials are passed to the client via the discovery server.

lukasschreiber commented 1 year ago

Might be interesting: https://github.com/coturn/coturn

lukasschreiber commented 1 year ago

How can we say that a STUN Server is enough, doesn't that depend on the peers configuration? In my understanding you need a TURN server once one peer is behind a symmetric NAT. I think we should provide a TURN server and therefore sacrifice the p2p thing if you are connected over the internet and not just within the same network

mohe2015 commented 1 year ago

How can we say that a STUN Server is enough, doesn't that depend on the peers configuration? In my understanding you need a TURN server once one peer is behind a symmetric NAT. I think we should provide a TURN server and therefore sacrifice the p2p thing if you are connected over the internet and not just within the same network

Yeah, we should probably provide both for user friendlyness. If its possible I think it would be nice to show in the UI whether you are connected using a TURN server. also we need to ensure its access is restricted so nobody is using it for other purposes. additionally at a later stage the connection over the turn server probably needs to be authenticated using the webrtc peer certificates to prevent man in the middle.

lukasschreiber commented 1 year ago

Habe gerade keinen Bock auf Designen, ich installiere das ding mal auf meinem server (oder verusche es xD)

lukasschreiber commented 1 year ago

Verstehe ich es richtig, dass man hier quasi herausfinden muss ob man STUN oder TURN benötigt und wenn man es benötigt muss man die IP Adresse und das Port ermitteln und das entsprechend in die Session Description packen oder ist es komplizierter als das?

lukasschreiber commented 1 year ago

@mohe2015

lukasschreiber commented 1 year ago

Oder reicht es sogar die Daten als iceServer irgendwo zu übergeben? Weil die normale Webbrowser implementierung von WebRTC kann glaube ich selbst entscheiden was sie nutzt...

mohe2015 commented 1 year ago

Oder reicht es sogar die Daten als iceServer irgendwo zu übergeben? Weil die normale Webbrowser implementierung von WebRTC kann glaube ich selbst entscheiden was sie nutzt...

Sollte man irgendwo angeben können und dann sollte das gehen

lukasschreiber commented 1 year ago

https://www.scala-js.org/api/scalajs-dom/0.9.0/#org.scalajs.dom.experimental.webrtc.RTCConfiguration hier kann man das einfach bei loci.communicator.webrtc.offer(...) übergeben

lukasschreiber commented 1 year ago

time: 3.5h