refactor: 移除自签名证书方案,服务只跑 HTTP

麦克风安全上下文改由部署方案解决:本机用 localhost,
对外部署挂 HTTPS 反向代理。删除 certs/、gen-cert.sh、
/cert 路由与 HTTPS server 分支,文档同步更新。

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-18 19:28:59 +08:00
parent 9be38aa44e
commit 5f7f68150e
11 changed files with 41 additions and 177 deletions

View File

@@ -1,7 +1,7 @@
#!/bin/bash
# ============================================================
# 乘法口诀 —— 新电脑一键部署脚本macOS
# 作用:检查/安装依赖(ffmpeg + whisper-cpp) → 补齐模型 → 生成证书 → 启动服务
# 作用:检查/安装依赖(ffmpeg + whisper-cpp) → 补齐模型 → 启动服务
# 幂等:已装的会跳过,可反复运行
# ============================================================
set -e
@@ -41,14 +41,6 @@ else
echo "✅ 模型 ggml-small.bin 已存在"
fi
# 5) 自签名证书iOS 语音必需)
if [ ! -f certs/cert.pem ]; then
echo "🔐 生成自签名 HTTPS 证书…"
bash gen-cert.sh
else
echo "✅ 证书已存在IP 变了请手动跑 bash gen-cert.sh 重生成)"
fi
echo ""
echo "==== 部署完成,启动服务 ===="
exec node server.js