Skip to content

Signaling

Dirk Holtwick edited this page Apr 7, 2021 · 7 revisions

Signaling is required to set up a WebRTC connection. The source code is available at https://github.com/holtwick/briefing/tree/master/signal The actual installation is based in Germany/Bavaria at Hetzner Online.

Security

The signaling is the most sensitive place for establishing a connection. Currently, it is not protected in a specific way, but it will be rewritten to be completely agnostic of contents in order to allow true E2EE.

Apache Port Forwarding

If you want to pass a local node.js server e.g. on port 4444 through Apache, this snippet will be useful:

ProxyRequests on

RewriteEngine On
RewriteCond %{HTTP:Upgrade} =websocket [NC]
RewriteRule /(.*)           ws://127.0.0.1:4444/$1 [P,L]
RewriteCond %{HTTP:Upgrade} !=websocket [NC]
RewriteRule /(.*)           http://127.0.0.1:4444/$1 [P,L]

ProxyPass "/" "http://127.0.0.1:4444/"
ProxyPassReverse "/" "http://127.0.0.1:4444/"

Make sure all Apache modules required have been enabled like this e.g.:

sudo a2enmod proxy proxy_http proxy_balancer lbmethod_byrequests

Lightweight

The Signaling Server is super lightweight and did run 11 months without restart and any troubles (as of April 2021):

$ pm2 status
┌─────┬──────────────────┬─────────────┬─────────┬─────────┬──────────┬────────┬──────┬───────────┬──────────┬──────────┬ 
│ id  │ name               │ namespace    │ version  │ mode     │ pid       │ uptime  │ ↺    │ status     │ cpu       │ mem       │  
├─────┼──────────────────┼─────────────┼─────────┼─────────┼──────────┼────────┼──────┼───────────┼──────────┼──────────┼ 
│ 0   │ signal-server      │ default      │ 1.0.0    │ fork     │ xxx       │ 11M     │ 0    │ online     │ 0%        │ 144.8mb   │  
└─────┴──────────────────┴─────────────┴─────────┴─────────┴──────────┴────────┴──────┴───────────┴──────────┴──────────┴ 
Clone this wiki locally