feat: 接入端到端 demo 与签名变体

- Flutter 桌面端通过 dart:ffi 调用 Rust Core cdylib
- 实现 ECDH P-256 密钥协商、HKDF 子密钥派生、AES-256-GCM 控制帧
- Android 被控端用派生密钥做控制帧加密与媒体包 MAC
- 新增 libopus JNI 骨架,默认回退 MediaCodec
- 新增 aosp/zhanxun/neutral 签名变体与系统 sharedUserId
- 本机独立信令服务与设置页开关
- 新增 .gitignore 排除所有编译产物与打包目录
This commit is contained in:
tongtong committed 2026-11-26 18:24:02 +08:00
commit 31b9a52eb4
154 files changed
+13287

No files matched your search

+36
View File
@@ -0,0 +1,36 @@
#!/usr/bin/env bash
set -euo pipefail
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
FLUTTER_DIR="$ROOT/flutter_sender"
SIGNAL_DIR="$ROOT/signaling_server"
PLATFORM="$(uname -s)"
case "$PLATFORM" in
Darwin)
DIST="$ROOT/dist/TTSTDConnect-macOS"
mkdir -p "$DIST"
echo "构建 Flutter macOS 应用..."
(cd "$FLUTTER_DIR" && flutter build macos --release)
APP_SOURCE="$FLUTTER_DIR/build/macos/Build/Products/Release/ttstd_sender.app"
cp -R "$APP_SOURCE" "$DIST/"
echo "构建内置信令服务..."
(cd "$SIGNAL_DIR" && go build -o "$DIST/ttstd_sender.app/Contents/MacOS/signaling_server" .)
;;
Linux)
DIST="$ROOT/dist/TTSTDConnect-Linux"
mkdir -p "$DIST"
echo "构建 Flutter Linux 应用..."
(cd "$FLUTTER_DIR" && flutter build linux --release)
cp -R "$FLUTTER_DIR/build/linux/x64/release/bundle/." "$DIST/"
echo "构建内置信令服务..."
(cd "$SIGNAL_DIR" && go build -o "$DIST/signaling_server" .)
;;
*)
echo "不支持的平台:$PLATFORM,请使用 installer/windows/package.ps1" >&2
exit 1
;;
esac
echo "打包完成:$DIST"
echo "安装包默认使用本机信令服务器,端口 8080;可在设置页关闭或切换为外部服务器。"
+40
View File
@@ -0,0 +1,40 @@
$ErrorActionPreference = "Stop"
$root = (Resolve-Path (Join-Path $PSScriptRoot "..\..")).Path
$flutterDir = Join-Path $root "flutter_sender"
$signalDir = Join-Path $root "signaling_server"
$rustDir = Join-Path $root "rust_core"
$dist = Join-Path $root "dist\TTSTDConnect-Windows"
foreach ($required in @($flutterDir, $signalDir, $rustDir)) {
if (-not (Test-Path $required)) {
throw "Missing project directory: $required"
}
}
Write-Host "Building Flutter Windows app..."
Push-Location $flutterDir
flutter build windows --release
Pop-Location
New-Item -ItemType Directory -Force -Path $dist | Out-Null
$flutterOutput = Join-Path $flutterDir "build\windows\x64\runner\Release"
Copy-Item -Recurse -Force (Join-Path $flutterOutput "*") $dist
Write-Host "Building embedded signaling server..."
Push-Location $signalDir
go build -o (Join-Path $dist "signaling_server.exe") .
Pop-Location
Write-Host "Building Rust Core cdylib..."
Push-Location $rustDir
cargo build --release
Pop-Location
$coreDll = Join-Path $rustDir "target\release\ttstdconnect_core.dll"
if (-not (Test-Path $coreDll)) {
throw "Rust Core dynamic library not found: $coreDll"
}
Copy-Item -Force $coreDll (Join-Path $dist "ttstdconnect_core.dll")
Write-Host "Package ready: $dist"
Write-Host "Default mode: local signaling on port 8080. Use Settings to disable it or switch to an external server."