Peer-to-peer WebRTC connection with minimal setup.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

41 lines
1.0 KiB

upstream minimal-webrtc {
# Set this to the actual path of the unix socket.
server unix:/var/run/minimal-webrtc.sock;
server {
listen 443 ssl http2 default_server;
listen [::]:443 ssl http2 default_server;
# Use self-signed certificate.
ssl_certificate /etc/ssl/certs/localhost.crt;
ssl_certificate_key /etc/ssl/private/localhost.key;
ssl_protocols TLSv1.2;
root /var/www/html-ssl;
index index.html;
server_name _;
location /camera/ {
alias /path/to/minimal-webrtc/wwwroot/;
try_files $uri $uri/ @minimal_webrtc;
location @minimal_webrtc {
proxy_pass http://minimal-webrtc;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $server_name;
# This header has to match the file.
proxy_set_header X-Forwarded-Proto $scheme;