qiuruiandClaude Sonnet 4.6 2f73e25c4c deploy: deb installation test — Python source packages + audit_logger fix
- audit_logger.py: _ensure_schema() wraps CREATE TABLE in try/except
  so kvm_mitm (INSERT/SELECT only) can still connect and log normally;
  postinst already creates the table
- build-python-debs.sh: add MODE B (source wrapper) as default for
  ARM64 dev machines without mitmproxy 10+; MODE A (PyInstaller) via --pyinstaller
- debian/kvm-mitm/DEBIAN/control: depends python3 (>= 3.9), arch=all
- debian/kvm-agent/DEBIAN/control: same
- debian/*/usr/bin/: shell wrappers exec python3 -m <module>
- .gitignore: exclude debian/*/usr/lib/ (populated by build script)

Installation test results (NanoPC-T6):
  kvm-server 1.0.0-3: active, privacy API native Go verified
  kvm-mitm 1.0.0-1: active on port 8888 (replaces privacy-gateway)
  kvm-agent 1.0.0-1: binary + queue list/add verified against MariaDB

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-04 04:05:59 +00:00
2026-02-28 17:33:28 +08:00

KVM-Privacy Hub

在 KVM-over-IP 系统基础上叠加三层隐私保护能力,运行于 NanoPC-T6 (RK3588)。

架构概览

┌─────────────────────────────────────────────────────────┐
│                     KVM 控制台 (8080)                    │
│          Go 单体 + React Web UI + WebRTC 推流            │
└──────────────┬──────────────────────┬───────────────────┘
               │                      │
    ┌──────────▼──────────┐  ┌────────▼────────────────┐
    │  Phase 1: 视频遮罩  │  │  Phase 3: AI 路由层     │
    │  OCR 检测 → YUV黑框 │  │  mem-bridge 8003/8002   │
    │  /api/v1/privacy/   │  │  Qwen2-1.5B(Ollama本地) │
    └──────────┬──────────┘  └─────────────────────────┘
               │
    ┌──────────▼──────────┐
    │  Phase 2: 隐私网关  │
    │  mitmproxy (8888)   │
    │  拦截 AI 平台上传   │
    └──────────┬──────────┘
               │
    ┌──────────▼──────────┐
    │  info-privacy-rs    │
    │  RKNN PII 检测/脱敏 │
    │  Rust 加速 (8001)   │
    └─────────────────────┘

端口规划

服务 端口 说明
kvm-server 8080 KVM 主服务(systemd 管理)
info-privacy-rs 8001 Rust/RKNN PII 检测与脱敏
mem-bridge memory 8003 会话记忆服务
mem-bridge router 8002 AI 路由服务
privacy-gateway 8888 mitmproxy 代理网关

依赖项目(submodule

路径 说明
deps/KVM KVM-over-IP 核心服务(Go + React
deps/embedding mem-bridge 记忆服务与 AI 路由
deps/info-privacy-rs Rust/RKNN 加速的 PII 检测脱敏服务

快速部署

git clone --recurse-submodules http://edge-stack.synology.me:3000/qiurui/KVM-privacy.git
cd KVM-privacy

# 部署隐私网关 + systemd 服务
make deploy-gateway

# 部署 mem-bridge 记忆服务
make deploy-memory

# 查看所有服务状态
make status

详见 DEVELOP.md

S
Description
KVM Privacy Hub: video PII masking, AI gateway, local routing
Readme
1.1 MiB
Languages
Python 96.7%
Shell 2.2%
Makefile 1.1%