Skip to content

UDP communication between the browser and the server using WebRTC DataChannel

Notifications You must be signed in to change notification settings

epozzobon/sdsu-stack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sdsu-stack

UDP communication between the browser and the server using WebRTC DataChannel.

This project is just a proof-of-concept. It contains insecure implementations of STUN, SCTP, UDP and even IP, so it should not be user anywhere. Ever.

Compile it:

gcc src/*.c -lssl -lcrypto -o webrtc_server

Run make_tun.sh in order to to setup the TUN virtual device, then run webrtc_server:

sudo ./make_tun.sh
./webrtc_server

After enstablishing the DTLS and SCTP sessions, the payload of SCTP packets from the browser will be mapped onto UDP packets on the TUN device.

The demo directory contains a nodejs application to compare websockets latency with webrtc datachannels. To run it, set the server IP address in demo/routes/index.js, then run the demo:

cd demo
$EDITOR routes/index.js
# Change the serverIP field
npm install
bin/www

Point your browser to http://localhost:4000 to see the demo.

Currently tested on Chromium 66.0.3359.117 (Official Build) Arch Linux (64-bit).

About

UDP communication between the browser and the server using WebRTC DataChannel

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages