# TURN server configuration for WhatsApp Clone
# Install coturn: sudo apt-get install coturn

# Listening port for TURN
listening-port=3478

# TLS listening port
tls-listening-port=5349

# Listening IP (replace with your server IP)
listening-ip=0.0.0.0
relay-ip=YOUR_SERVER_PUBLIC_IP

# External IP (replace with your public IP)
external-ip=YOUR_SERVER_PUBLIC_IP

# TURN server realm
realm=whatsapp-clone.local

# Server name
server-name=whatsapp-clone-turn

# Use fingerprints
fingerprint

# Enable long-term credential mechanism
lt-cred-mech

# User credentials (format: username:password)
# Change these in production!
user=whatsapp:turnsecret2024

# Total and per-user quotas
max-bps=1000000
bps-capacity=0

# Logging
log-file=/var/log/turnserver.log
verbose

# No multicast peers
no-multicast-peers

# Mobility with ICE
mobility

# No TLS
no-tls
no-dtls

# Disable CLI
no-cli

# Enable STUN
stun-only=false

# Denied peer IP ranges (optional security)
denied-peer-ip=0.0.0.0-0.255.255.255
denied-peer-ip=10.0.0.0-10.255.255.255
denied-peer-ip=172.16.0.0-172.31.255.255
denied-peer-ip=192.168.0.0-192.168.255.255

# Allowed peer IP (your application servers)
# allowed-peer-ip=YOUR_APP_SERVER_IP