diff --git a/README.md b/README.md index 98d41ca..aeb59e7 100644 --- a/README.md +++ b/README.md @@ -16,8 +16,7 @@ It is built on top of [Electron React Boilerplate](https://github.com/electron-r For better security mechanism, end-to-end encryption is implemented, which is inspired by [darkwire.io](https://github.com/darkwire/darkwire.io). The difference is that it is rewritten in `Typescript` and transformed to use `node-forge` instead of `window.crypto.subtle`. -Why this was made? Because a client served with `http` without SSL, which makes `window.crypto. subtle` unavailable. -(TODO: write more docs about Deskreen architecture) +Why this was made? Because a client served with `http` without SSL, which makes `window.crypto.subtle` unavailable. ## Get Started for Developers @@ -77,10 +76,14 @@ TODO: add how to get started with local SonarCube for Deskreen in details. ## Documentation -### High level design +### High level architecture design ![high-level-design](./doc/architecture/deskreen-arch-pavlobu-21012021.svg) +### WebRTC Screen Sharing Session Initiation Step by Step + +![sharng-session-init](./doc/init-sharing-session/deskreen-webrtc-screen-sharing-session-initiation-pavlobu-22012021.svg) + ## Note on versioning: - All versions git tags should start with `v` ex. `v1.0.0` diff --git a/doc/init-sharing-session/deskreen-webrtc-screen-sharing-session-initiation-pavlobu-22012021.html b/doc/init-sharing-session/deskreen-webrtc-screen-sharing-session-initiation-pavlobu-22012021.html new file mode 100644 index 0000000..16e06b2 --- /dev/null +++ b/doc/init-sharing-session/deskreen-webrtc-screen-sharing-session-initiation-pavlobu-22012021.html @@ -0,0 +1,23 @@ + + + + + + deskreen-webrtc-screen-sharing-session-initiation-pavlobu-22012021 + + + + +
+ + + diff --git a/doc/init-sharing-session/deskreen-webrtc-screen-sharing-session-initiation-pavlobu-22012021.svg b/doc/init-sharing-session/deskreen-webrtc-screen-sharing-session-initiation-pavlobu-22012021.svg new file mode 100644 index 0000000..dbe7234 --- /dev/null +++ b/doc/init-sharing-session/deskreen-webrtc-screen-sharing-session-initiation-pavlobu-22012021.svg @@ -0,0 +1,3 @@ + + +
Deskreen | WebRTC Screen Sharing Session Initiation Step by Step  by Pavlo (Paul) Buidenkov 22 Jan 2021

Deskreen | WebRTC Screen Sharing Session Initiation Step by Step  by Pavlo (Paul) Buidenkov 22 Jan 2021...
https://www.deskreen.com
https://www.deskreen.com
Computer on private network with Deskreen App running
Computer on private network...
connected on 127.0.0.1
connected on 127.0.0.1
WiFi or LAN or 127.0.0.1
WiF...
Client viewing device  on private network
 with a WebRTC compatible WebBrowser
Client viewing device  on private netw...
Generate a public private keypair, one for all sessions
Generate a public...
HTTP GET <addr>/<roomID>
HTTP GET <addr>/<roomID>
send static files in response
send static files in response
Generate public private keypair, one for current session
Generate public...
emit GET_MY_IP
emit GET_MY_IP
passthrough USER_ENTER event to host
passthrough USER_ENTER event to host
associated socket's ID device IP sent back
associated socket's ID device IP sent back
show my device details in UI with device IP
show my device detail...
socket connect to <roomID> ex. 123456, 
every event below in this diagram
 is emitted to same roomID 
socket connect to <roomID> ex. 123456,...
emit USER_ENTER event with public key in payload
emit USER_ENTER event with public key in payload
socket connect to <roomID> ex. 123456
wait for USER_ENTER event from client, 
every event below in this diagram
 is emitted to same roomID 

socket connect to <roomID> ex. 123456...
emit ENCRYPTED_MESSAGE with payload
type: ADD_USER, host (my) public key in it

and isOwner: true (admin privilege to lock room)
emit ENCRYPTED_MESSAGE with payload...
keep client's public key and encrypt further payloads with it
keep client's pub...
emit ENCRYPTED_MESSAGE passthrough
encrypted payload to client
emit ENCRYPTED_MESSAGE passthrough...
keep received host's public key and encrypt further payloads with it
keep received host's...
Sinaling Server ( HTTP and Websocket electron main process )
Sinaling Server ( H...
Screen Sharing Session ( electron renderer process )
Screen Sharing Sess...
emit LOCK_ROOM to prevent other
clients to connect to this room, if someone tries to
connect, they will receive a ROOM_LOCKED
emit LOCK_ROOM to prevent other...
User clicks 'Allow' to connect button,
then selects Screen or App window to be shared, then clicks Confirm
User clicks 'Allo...
emit ENCRYPTED_MESSAGE 
with CALL_USER payload that has
MY WebRTC signal 
for call
 retrieved from simple-peer
emit ENCRYPTED_MESSAGE...
passthrough ENCRYPTED_MESSAGE with payload
passthrough ENCRYPTED_MESSAGE with payload
set received peer signal to simple-peer
set received peer si...
emit ENCRYPTED_MESSAGE with
CALL_ACCEPTED payload, that has MY WebRTC
signal for call  retrieved from simple-peer
emit ENCRYPTED_MESSAGE with...
passthrough ENCRYPTED_MESSAGE with payload
passthrough ENCRYPTED_MESSAGE with payload
set received peer signal to simple-peer
set received pe...
when electron desktopCapturer
stream available,
simple-peer sends
stream to client 
when electron d...
send stream with WebRTC
send stream with WebRTC
when simple-peer.on('stream', 
occurs -> show stream in web
browser UI video DOM element
when simple-peer.on(...
Viewer does not support full SVG 1.1
\ No newline at end of file