bug改修,智家模块

This commit is contained in:
zhongluofeng committed 2026-10-23 17:25:17 +08:00
1 parent 063718f86d
commit fcbcf07b87
52 files changed
+12602 -142

No files matched your search

+19 -3
View File
@@ -42,8 +42,14 @@ chrono = "0.4"
# blocking:音乐播放引擎在**独立 std 线程**上解码(symphonia 的 MediaSource 是同步
# Read+Seek),需要同步 HTTP 客户端去按 Range 拉 NAS 音频流。放在 std 线程上用
# blocking 是安全的(在 tokio 运行时线程里用才会 panic)。
reqwest = { version = "0.12", features = ["json", "stream", "multipart", "blocking"] }
futures-util = "0.3"
# gzip:智能家居模块走反代(Cloudflare Tunnel)链路时,`/api/states` 是几百 KB JSON。
# **默认不开压缩就不会发 Accept-Encoding**,CF 会回未压缩响应,远端首屏流量翻 5–10 倍
# (见 doc/SMART_HOME_MODULE_PLAN.md §3.7-b)。
reqwest = { version = "0.12", features = ["json", "stream", "multipart", "blocking", "gzip"] }
# `sink`:WebSocket 客户端要把流拆成读/写两半(`SinkExt` / `StreamExt`)。
# default 特性里**不含** `sink`(已核对 0.3.32 的 Cargo.toml),目前只是因为
# tokio-tungstenite 自己开了它才传递可用 —— 依赖传递特性不该被当成前提,故显式打开。
futures-util = { version = "0.3", features = ["sink"] }
tokio = { version = "1", features = ["io-util", "time", "rt-multi-thread", "macros", "sync", "fs", "net"] }
axum = { version = "0.7", features = ["ws"] }
url = "2"
@@ -104,7 +110,14 @@ aes = "0.8"
cbc = "0.1"
rsa = { version = "0.9", features = ["pem"] }
rand = "0.8"
tokio-tungstenite = "0.24"
# WebSocket 客户端(智能家居模块 P4 的实时推送 / 规则引擎)。
# `connect` 已随 default 启用(`cargo tree -e features -i tokio-tungstenite` 复核过:
# 它由本项 + axum 的 `ws` 共同引入),这里显式写出来是为了让"要连"这件事在清单里可见。
# **TLS 默认未启用** —— 反代是 HTTPS(`wss://`,D5 已定必须支持),故补
# `rustls-tls-webpki-roots`:纯 Rust、无 C 依赖,与项目姿态一致(`native-tls` 会引入系统依赖),
# 且复用依赖树里已存在的 rustls 0.23(经 russh),不新增编译单元。
# 注意:自签证书的 `wss://` 仍是缺口 —— `insecure`(危险开关)目前只覆盖 REST。
tokio-tungstenite = { version = "0.24", features = ["connect", "rustls-tls-webpki-roots"] }
image = { version = "0.25", default-features = false, features = ["png", "jpeg", "webp"] }
walkdir = "2"
notify = { version = "6", features = [] }
@@ -178,6 +191,9 @@ windows = { version = "0.52", features = [
"Win32_System_Ole",
"Win32_System_Variant",
"Win32_UI_Shell",
# 快速面板「保存截图后定位并进入重命名」:SHParseDisplayName / SHOpenFolderAndSelectItems
# 与 ITEMIDLIST 都被 Win32_UI_Shell_Common 门控(windows 0.52 源码 cfg)
"Win32_UI_Shell_Common",
"Win32_UI_WindowsAndMessaging",
# 翻译模块:Windows.Media.Ocr 本地识别(WinRT)
# Foundation_Collections:OcrResult.Lines / OcrEngine.AvailableRecognizerLanguages 返回 IVectorView