feat(sender): 设备指纹固定、/watch 实时刷新、中继连接与文件子协议上传

- 新增 PinStore:首次连接记录被控端签名指纹,变化时弹窗确认
- 新增 SignalingWatch:订阅 /watch,300ms 去抖后重拉设备列表
- 设置页新增"连接走信令中继",主控端按该开关走 ttstd_relay_start
- 中继模式禁用投屏并提示原因,状态卡区分直连/中继
- 新增 ControlFileClient:通过 msgType=7 分片上传/列目录,文件页加入口
- NativeCore/Bridge 暴露 relayStart/relayStop/sendFileRequest
This commit is contained in:
tongtong committed 2026-11-27 18:44:49 +08:00
1 parent 22bac28914
commit a9ba4bb7bc
9 files changed
+752 -8

No files matched your search

+7
View File
@@ -125,6 +125,8 @@ class AppSettings {
final int filePort;
/// 被控端文件服务访问令牌,被控端主界面会显示。
final String fileToken;
/// 连接时是否走信令中继(跨网段)。中继只承载控制通道,不能投屏。
final bool relayEnabled;
const AppSettings({
this.signalingUrl = '',
@@ -138,6 +140,7 @@ class AppSettings {
this.bitrateMbps = 8,
this.filePort = 53317,
this.fileToken = '',
this.relayEnabled = false,
});
static const defaults = AppSettings();
@@ -156,6 +159,7 @@ class AppSettings {
int? bitrateMbps,
int? filePort,
String? fileToken,
bool? relayEnabled,
}) {
return AppSettings(
signalingUrl: signalingUrl ?? this.signalingUrl,
@@ -169,6 +173,7 @@ class AppSettings {
bitrateMbps: bitrateMbps ?? this.bitrateMbps,
filePort: filePort ?? this.filePort,
fileToken: fileToken ?? this.fileToken,
relayEnabled: relayEnabled ?? this.relayEnabled,
);
}
@@ -187,6 +192,7 @@ class AppSettings {
bitrateMbps: (json['bitrateMbps'] is num ? json['bitrateMbps'] as num : 8).toInt(),
filePort: (json['filePort'] is num ? json['filePort'] as num : 53317).toInt(),
fileToken: (json['fileToken'] ?? defaults.fileToken).toString(),
relayEnabled: json['relayEnabled'] as bool? ?? defaults.relayEnabled,
);
}
@@ -202,5 +208,6 @@ class AppSettings {
'bitrateMbps': bitrateMbps,
'filePort': filePort,
'fileToken': fileToken,
'relayEnabled': relayEnabled,
};
}