Skip to content

Configuration

DNTOF edited this page Aug 28, 2026 · 4 revisions

配置参考

配置文件由 LabAPI 自动生成:LabAPI/configs/<端口>/SLDataAPI/config.yml 键名为 snake_case(LabAPI UnderscoredNamingConvention)。

⚠️ 错误键名会被静默忽略;任何值的结构性错误会导致整个文件回退默认值(启动日志会打精确行号)。

类型 默认 说明
debug bool false Debug 日志
verify_token string your_secret_token 只读接口鉴权
http_port int 8081 HTTP 端口
push_interval_seconds int 8 快照刷新间隔
control_enabled bool false 控制接口总开关
control_token string "" 控制接口 token(≥8 位四类字符)
control_transport string http 传输方式 http|ws 二选一硬互斥
auto_update_check bool true 检查更新
auto_update_install bool true 自动下载替换 DLL
file_root string "" 文件端点根目录(空=禁用)
log_directory string "" 日志目录(空=自动探测)
voice_enabled bool false 语音转发 WS
voice_port ushort 8082 语音端口
voice_record_enabled bool false 录音取证
voice_record_max_rounds int 10 保留局数
voice_record_dir string "" 录音目录(空=默认)
report_enabled bool false 举报功能总开关(SSS 面板 + /control/reports 端点)
report_max_records int 50 举报记录最大条数(超出删最旧已处理;全未处理 WARN 提示)
report_rate_limit int 5 限流窗口内每人最多举报次数
report_rate_window_minutes int 30 举报限流窗口(分钟)

⚠️ token 写法:推荐 ASCII 双引号包裹(control_token: "你的token")。裸值以 */&/! 开头会被 YAML 当作别名/锚点/tag(* 直接解析失败回退默认值,&/! 值被吞成空);从聊天软件复制的弯引号(‘’“”)会被当成 token 内容导致鉴权必败。v2.5.4 起插件启动时会检测引号字符并报错点破。

Clone this wiki locally