2024-07-08 20:24:23 +03:00
|
|
|
{ cluster, depot, ... }:
|
2021-10-16 21:23:43 +03:00
|
|
|
{
|
|
|
|
services.coturn = {
|
|
|
|
enable = true;
|
|
|
|
no-cli = true;
|
2023-08-31 01:55:45 +03:00
|
|
|
realm = depot.lib.meta.domain;
|
2021-10-16 21:23:43 +03:00
|
|
|
|
|
|
|
no-tcp-relay = true;
|
|
|
|
min-port = 64000;
|
|
|
|
max-port = 65535;
|
|
|
|
# TODO: unhardcode
|
|
|
|
listening-ips = [ "95.216.8.12" ];
|
|
|
|
|
|
|
|
lt-cred-mech = true;
|
|
|
|
use-auth-secret = true;
|
|
|
|
|
2024-07-08 20:24:23 +03:00
|
|
|
static-auth-secret-file = cluster.config.services.matrix.secrets.coturnStaticAuth.path;
|
2021-10-16 21:23:43 +03:00
|
|
|
# TODO: acme
|
|
|
|
cert = "/etc/coturn/certs/fullchain.pem";
|
|
|
|
pkey = "/etc/coturn/certs/privkey.pem";
|
|
|
|
|
|
|
|
extraConfig = ''
|
|
|
|
no-tlsv1
|
|
|
|
no-tlsv1_1
|
|
|
|
denied-peer-ip=10.0.0.0-10.255.255.255
|
|
|
|
denied-peer-ip=192.168.0.0-192.168.255.255
|
|
|
|
denied-peer-ip=172.16.0.0-172.31.255.255
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
}
|