[gateway]
max_connections = 2000
connection_timeout = 300
heartbeat_interval = 60
use_internal_auth = true
handler_max_inflight = 2000
[[gateway.listeners]]
protocol = "tcp"
host = "0.0.0.0"
port = 9001
[[gateway.listeners]]
protocol = "quic"
host = "0.0.0.0"
port = 9001
[[gateway.listeners]]
protocol = "websocket"
host = "0.0.0.0"
port = 9080
path = "/gate"
compression = true
[cache]
l1_max_memory_mb = 256
l1_ttl_secs = 3600
[cache.redis]
url = "redis://127.0.0.1:6379"
pool_size = 50
min_idle = 10
connection_timeout = 5
command_timeout_ms = 5000
idle_timeout = 300
[cache.online_status]
timeout_seconds = 300
cleanup_interval_seconds = 60
[admin]
port = 9090
[file]
default_storage_source_id = 0
server_port = 9083
server_api_base_url = "http://localhost:9083/api/app"
[[file.storage_sources]]
id = 0
storage_type = "local"
storage_root = "./storage/files"
base_url = "http://localhost:8080/files"
[push]
enabled = false
[push.apns]
enabled = false
bundle_id = "com.netonstream.privchat"
team_id = ""
key_id = ""
private_key_path = ""
use_sandbox = true
[push.fcm]
enabled = false
project_id = ""
access_token = ""
[push.hms]
enabled = false
app_id = ""
access_token = ""
endpoint = "https://push-api.cloud.huawei.com"
[push.honor]
enabled = false
app_id = ""
access_token = ""
endpoint = "https://push-api.hihonor.com"
[push.xiaomi]
enabled = false
app_id = ""
access_token = ""
endpoint = "https://api.xmpush.xiaomi.com"
[push.oppo]
enabled = false
app_id = ""
access_token = ""
endpoint = "https://api.push.oppomobile.com"
[push.vivo]
enabled = false
app_id = ""
access_token = ""
endpoint = "https://api-push.vivo.com.cn"
[push.lenovo]
enabled = false
app_id = ""
access_token = ""
endpoint = "https://push-api.lenovo.com"
[push.zte]
enabled = false
app_id = ""
access_token = ""
endpoint = "https://push-api.ztedevice.com"
[push.meizu]
enabled = false
app_id = ""
access_token = ""
endpoint = "https://server-api-push.meizu.com"
[logging]
level = "info"
format = "compact"
file = "./logs/server.log"
[system_message]
enabled = true
welcome_message = """
👋 欢迎使用 Privchat!
这是一个端到端加密的即时通讯系统,您的隐私安全由我们守护。
🔐 主要特性:
• 端到端加密通讯
• 多设备同步
• 离线消息推送
• 文件安全传输
如有任何问题,欢迎随时联系我们!
"""
auto_create_channel = true
auto_send_welcome = true