testing nginx rtmp

This commit is contained in:
Gabriel Simmer 2024-02-05 13:10:41 +00:00
parent 2254f4047f
commit 7d19154b03
Signed by: arch
SSH key fingerprint: SHA256:m3OEcdtrnBpMX+2BDGh/byv3hrCekCLzDYMdvGEKPPQ

View file

@ -34,12 +34,12 @@
firewall = {
trustedInterfaces = ["tailscale0"];
checkReversePath = "loose";
allowedTCPPorts = [ 80 443 ];
allowedTCPPorts = [ 80 443 1935 ];
allowedUDPPortRanges = [
{ from = 4000; to = 4007; }
{ from = 8000; to = 8010; }
];
allowedUDPPorts = [ 41641 ];
allowedUDPPorts = [ 41641 1935 ];
enable = true;
};
nftables.enable = true;
@ -77,6 +77,7 @@
openFirewall = false;
};
nginx = {
additionalModules = [ pkgs.nginxModules.rtmp ];
enable = true;
recommendedProxySettings = true;
recommendedGzipSettings = true;
@ -100,6 +101,29 @@
};
};
};
appendConfig = ''
rtmp {
server {
listen 1936;
chunk_size 4096;
application live {
live on;
allow publish 127.0.0.1;
allow publish 100.110.180.123;
allow publish fd7a:115c:a1e0::246e:b47b;
deny publish all;
allow play all;
record off;
hls on;
hls_path /tmp/hls;
dash on;
dash_path /tmp/dash;
}
}
}
'';
};
};