Configure self-hosted STUN for remote WebRTC

This commit is contained in:
Xin Wang
2026-08-05 14:05:22 +08:00
parent 16156028c9
commit 0456d2b4ae
7 changed files with 53 additions and 36 deletions

View File

@@ -23,7 +23,8 @@ KNOWLEDGE_TOP_K=5
# ---- WebRTC TURN(公网跨网语音预览;本地开发留空) ----
# 与 docker compose --profile remote 的 coturn 配套。云安全组需放行 UDP 3478 与 49152-49200。
# PUBLIC_IP 填云主机公网 IP(compose 里给 coturn --external-ip 用,见项目根 .env)
# TURN_URLS=turn:182.92.86.220:3478?transport=udp,turn:182.92.86.220:3478?transport=tcp
# Docker Compose 部署请在项目根 .env 设置这些变量;此处适用于宿主机直接运行 uvicorn
# STUN_URL=stun:118.89.89.89:3478
# TURN_URLS=turn:118.89.89.89:3478?transport=udp,turn:118.89.89.89:3478?transport=tcp
# TURN_SECRET=your-turn-secret
# TURN_CREDENTIAL_TTL=86400