fix(webrtc): 更新ICE服务器配置,新增备用TURN服务器并修复iOS模拟器连接问题

- 新增47.242.112.133的STUN/TURN服务器作为备用中继
- Flutter端添加turns: TLS中继,修复iOS模拟器无法获取relay候选的问题
- Web端同步添加新的ICE服务器配置
- 添加.gitignore忽略IDE配置文件
This commit is contained in:
2026-07-31 22:19:09 +08:00
parent 8935dc93d2
commit 6d729f38be
5 changed files with 34 additions and 11 deletions

View File

@@ -10,13 +10,15 @@ const videoRecorder = new VideoRecorder();
// 与 Android/Flutter 端一致的 ICE 配置(请按需替换为自己的 TURN 凭据)。
export const DEFAULT_ICE_SERVERS = [
// 公共 TURNrelay 兜底UDP + TCP 两种传输TCP 用于 UDP 被防火墙拦截的网络。
{ urls: 'stun:175.178.213.60:3478' },
{ urls: 'turn:175.178.213.60:3478', username: 'fanhuitong', credential: 'Fan19961207..' },
{ urls: 'turn:175.178.213.60:3478?transport=tcp', username: 'fanhuitong', credential: 'Fan19961207..' },
{ urls: 'stun:47.242.112.133:3478' },
{ urls: 'turn:47.242.112.133:3478', username: 'ttstd', credential: 'fanhuitong' },
// 内网 TURN与被控端同局域网时可用
// { urls: 'stun:192.168.5.224:3478' },
// { urls: 'turn:192.168.100.224:3478', username: 'tt', credential: 'fht' },
// { urls: 'turn:192.168.100.224:3478?transport=tcp', username: 'tt', credential: 'fht' },
{ urls: 'stun:175.178.213.60:3478' },
// { urls: 'stun:192.168.5.224:3478' },
// { urls: 'stun:stun.l.google.com:19302' },
// { urls: 'stun:stun1.l.google.com:19302' },
// { urls: 'stun:stun2.l.google.com:19302' },