新增功能

This commit is contained in:
Your Name
2026-03-04 15:32:30 +08:00
parent a07e844c47
commit ab77f5488d
2266 changed files with 177942 additions and 3444 deletions
+31
View File
@@ -0,0 +1,31 @@
#!/bin/bash
# 为开发环境生成自签名 HTTPS 证书
# 用于测试 WebRTC 功能
echo "=== 生成开发环境 HTTPS 证书 ==="
# 创建证书目录
mkdir -p .cert
# 生成自签名证书
openssl req -x509 -newkey rsa:4096 \
-keyout .cert/key.pem \
-out .cert/cert.pem \
-days 365 \
-nodes \
-subj "/C=CN/ST=State/L=City/O=Organization/CN=localhost"
echo ""
echo "✅ 证书生成成功!"
echo ""
echo "证书位置:"
echo " - 私钥: .cert/key.pem"
echo " - 证书: .cert/cert.pem"
echo ""
echo "下一步:"
echo "1. 修改 vite.config.ts,添加 HTTPS 配置"
echo "2. 运行 npm run dev"
echo "3. 浏览器访问 https://localhost:5173/admin/"
echo "4. 信任自签名证书(浏览器会提示不安全,点击继续访问)"
echo ""