Files
VibeCoding/README.md

37 lines
869 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
安装 turnserver
sudo apt update
sudo apt install coturn -y
sudo cp /etc/turnserver.conf /etc/turnserver.conf.bak
sudo vim /etc/turnserver.conf
# 监听
listening-ip=0.0.0.0
listening-port=3478
# 公网 IP云服务器这里必须填公网 IP不是内网 IP
external-ip=你的公网IP
# 认证WebRTC 必须,否则客户端连不上)
lt-cred-mech
user=testuser:testpass
realm=yourdomain.com # 随便填个域名也行,但不能不填
# 中继端口范围TURN 转发媒体用)
relay-port-range=49152-65535
# 日志
verbose
sudo ufw allow 3478/udp
sudo ufw allow 3478/tcp # WebRTC 可选但建议
sudo ufw allow 49152:65535/udp # TURN 中继端口
sudo systemctl restart coturn
sudo systemctl enable --now coturn
systemctl status coturn # 看是不是 active (running)
turnutils_uclient -v -u testuser -w testpass 你的公网IP