[ 'host' => '0.0.0.0', 'port' => 8443, 'ssl' => false, 'ssl_cert' => '/etc/nginx/ssl/server.crt', 'ssl_key' => '/etc/nginx/ssl/server.key', ], // ─── 信令服务配置 ───────────────────────────────────── 'signaling' => [ 'port' => 9443, 'heartbeat_interval' => 30, 'heartbeat_timeout' => 90, 'max_connections' => 1000, 'max_devices_per_ip' => 10, ], // ─── TURN服务器配置 ─────────────────────────────────── 'turn' => [ 'enabled' => true, 'host' => '', // coturn服务器地址, 留空则使用STUN only 'port' => 3478, 'secret' => 'xianyan-turn-secret-change-me', 'realm' => 'xianyan.com', 'credential_ttl' => 86400, // 24小时 'stun_servers' => [ 'stun:stun.l.google.com:19302', 'stun:stun1.l.google.com:19302', ], ], // ─── 配对服务配置 ───────────────────────────────────── 'pairing' => [ 'data_file' => __DIR__ . '/data/pairing_records.json', 'request_ttl' => 300, // 配对请求5分钟过期 'max_paired_per_user' => 20, ], // ─── 安全配置 ───────────────────────────────────────── 'security' => [ 'api_key' => 'xianyan-api-key-change-me', 'cors_origins' => ['*'], 'rate_limit' => 60, // 每分钟请求数 'fingerprint_min_length' => 16, ], // ─── 日志配置 ───────────────────────────────────────── 'log' => [ 'enabled' => true, 'file' => __DIR__ . '/logs/signaling.log', 'level' => 'info', // debug/info/warn/error 'max_size' => 10485760, // 10MB ], // ─── 协议配置 ───────────────────────────────────────── 'protocol' => [ 'supported' => ['xianyan-v1', 'localsend-v2'], 'default' => 'xianyan-v1', ], ];