Files
Meshray-Manager/configs/config.example.yaml
T
2026-06-30 15:14:37 +08:00

85 lines
2.1 KiB
YAML
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.
# MeshRay 配置文件示例
# 复制此文件为 config.yaml 并根据实际情况修改
# 服务器配置
server:
port: 9531
mode: release # debug, release, test
# 数据库配置
database:
type: sqlite
path: ./data/meshray.db
# JWT 配置
jwt:
secret: "" # 留空则自动生成
access_token_duration: 2h # 访问令牌有效期
refresh_token_duration: 7d # 刷新令牌有效期
# 日志配置
log:
level: info # debug, info, warn, error
format: json # json, console
output: ./logs/meshray.log
max_size: 100 # MB
max_backups: 7 # 保留 7 天
max_age: 30 # 天
# 加密配置
encryption:
network_secret_key: "" # 留空则基于主机硬件信息派生
# WireGuard 配置
wireguard:
preferred_mode: auto # auto, kernel, userspace
# STUN 服务器配置
stun:
# 默认 STUN 服务器列表(国内和国外)
default_servers:
# 国内 STUN 服务器
- stun:stun.qq.com:3478
- stun:stun.miwifi.com:3478
- stun:stun.bige0.com:3478
# 国外 STUN 服务器(Google
- stun:stun.l.google.com:19302
- stun:stun1.l.google.com:19302
- stun:stun2.l.google.com:19302
- stun:stun3.l.google.com:19302
- stun:stun4.l.google.com:19302
# 国外 STUN 服务器(其他)
- stun:stun.cloudflare.com:3478
- stun:stun.nextcloud.com:443
- stun:stun.sipgate.net:3478
- stun:stun.antisip.com:3478
- stun:stun.sonetel.com:3478
- stun:stun.voipgate.com:3478
# STUN 服务器选择策略
# auto: 自动选择(优先国内,延迟低的优先)
# domestic: 仅使用国内服务器
# international: 仅使用国外服务器
# custom: 仅使用自定义服务器
selection_strategy: auto
# 是否启用 STUN 服务器自动测试
auto_test: true
# STUN 测试间隔(秒)
test_interval: 300
# STUN 超时时间(秒)
timeout: 5
# TURN 服务器配置(可选)
turn:
# 默认 TURN 服务器
# 如果配置了 TURN 服务器,将作为 STUN 穿透失败时的回退方案
default_servers: []
# 示例配置:
# - url: turn:turn.example.com:3478
# username: user
# credential: pass
# auth_type: credential