功能:增加终端USB设备监控POC

This commit is contained in:
songyiming committed 2026-11-03 17:48:01 +08:00
1 parent 1bed1948b5
commit a98d9ddeee
15 files changed
+868

No files matched your search

@@ -0,0 +1,28 @@
active
enabled
11月 03 17:27:23 rk3528pro-ddr4 systemd[1]: Started vdi-usb-monitor.service - VDI approved USB storage redirection (device POC).
11月 03 17:27:23 rk3528pro-ddr4 vdi-usb-monitor[56130]: USB filesystem is mounted locally; unmount safely before export
11月 03 17:27:25 rk3528pro-ddr4 vdi-usb-monitor[56130]: exporting approved storage 3-1 at 127.0.0.1:40001
11月 03 17:29:02 rk3528pro-ddr4 vdi-usb-monitor[56130]: export session ended: exit status: 0; waiting before retry
11月 03 17:29:04 rk3528pro-ddr4 vdi-usb-monitor[56130]: exporting approved storage 3-1 at 127.0.0.1:40001
11月 03 17:34:43 rk3528pro-ddr4 vdi-usb-monitor[56130]: approved USB device disconnected; waiting for reinsertion
11月 03 17:34:45 rk3528pro-ddr4 vdi-usb-monitor[56130]: waiting for exactly one approved device; found 0
11月 03 17:34:53 rk3528pro-ddr4 vdi-usb-monitor[56130]: exporting approved storage 3-1 at 127.0.0.1:40001
/: Bus 001.Port 001: Dev 001, Class=root_hub, Driver=xhci-hcd/1p, 480M
|__ Port 001: Dev 047, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M
/: Bus 002.Port 001: Dev 001, Class=root_hub, Driver=xhci-hcd/1p, 5000M
/: Bus 003.Port 001: Dev 001, Class=root_hub, Driver=ehci-platform/1p, 480M
|__ Port 001: Dev 006, If 0, Class=Mass Storage, Driver=usbfs, 480M
/: Bus 004.Port 001: Dev 001, Class=root_hub, Driver=ohci-platform/1p, 12M
NAME TRAN FSTYPE LABEL MOUNTPOINTS
mmcblk1 mmc
├─mmcblk1p1 mmc ext4 armbi_boot /boot
└─mmcblk1p2 mmc ext4 armbi_root /var/log.hdd
/
mmcblk1boot0 mmc
mmcblk1boot1 mmc
zram0 [SWAP]
zram1 /var/log
zram2
active
46934 /home/armbian/vdi-build/rkmpp-experiment/build/moonlight/app/moonlight stream 192.168.1.70 Desktop --resolution 2560x1440 --fps 45 --bitrate 30000 --display-mode fullscreen --video-codec H.264 --video-decoder hardware --absolute-mouse --keep-awake --no-vsync --no-frame-pacing --audio-on-host
@@ -0,0 +1,16 @@
{
"vm": 100,
"device_present": true,
"channels": [
{
"frontend-open": true,
"filename": "tcp:127.0.0.1:45882 <-> 127.0.0.1:40001",
"label": "vdi_usb_box_100"
}
],
"usb": " Device 0.1, Port 1, Speed 480 Mb/s, Product QEMU USB Tablet, ID: tablet\r\n Device 1.1, Port 2, Speed 480 Mb/s, Product USB Redirection Device, ID: vdi_usb_redir_100\r\n",
"vm_status": {
"status": "running",
"running": true
}
}
@@ -0,0 +1,49 @@
{␍
"USB": [␍
{␍
"Model": "Kingston DataTraveler 3.0 USB Device",␍
"InterfaceType": "USB",␍
"PNPDeviceID": "USBSTOR\\DISK\u0026VEN_KINGSTON\u0026PROD_DATATRAVELER_3.0\u0026REV_PMAP\\408D5C1653D4E44179789251\u00260",␍
"Size": 62051512320,␍
"Index": 1␍
}␍
],␍
"Volume": [␍
{␍
"DriveLetter": "F",␍
"FileSystemLabel": "KINGSTON",␍
"FileSystem": "FAT32",␍
"DriveType": "Removable",␍
"Size": 61908123648,␍
"HealthStatus": "Healthy"␍
}␍
],␍
"PnP": [␍
{␍
"Status": "OK",␍
"Class": "DiskDrive",␍
"FriendlyName": "Kingston DataTraveler 3.0 USB Device",␍
"InstanceId": "USBSTOR\\DISK\u0026VEN_KINGSTON\u0026PROD_DATATRAVELER_3.0\u0026REV_PMAP\\408D5C1653D4E44179789251\u00260"␍
},␍
{␍
"Status": "OK",␍
"Class": "USB",␍
"FriendlyName": "USB Mass Storage Device",␍
"InstanceId": "USB\\VID_0951\u0026PID_1666\\408D5C1653D4E44179789251"␍
}␍
],␍
"GPU": [␍
{␍
"Name": "Virtual Display Driver",␍
"ConfigManagerErrorCode": 0␍
},␍
{␍
"Name": "NVIDIA GeForce GTX 965M",␍
"ConfigManagerErrorCode": 0␍
},␍
{␍
"Name": "Microsoft Basic Display Adapter",␍
"ConfigManagerErrorCode": 0␍
}␍
]␍
}␍
@@ -0,0 +1,21 @@
{␍
"Result": "PASS",␍
"Disk": [␍
{␍
"Model": "Kingston DataTraveler 3.0 USB Device",␍
"InterfaceType": "USB",␍
"PNPDeviceID": "USBSTOR\\DISK\u0026VEN_KINGSTON\u0026PROD_DATATRAVELER_3.0\u0026REV_PMAP\\408D5C1653D4E44179789251\u00260",␍
"Index": 1␍
}␍
],␍
"Volume": [␍
{␍
"DriveLetter": "F",␍
"DriveType": "Removable",␍
"FileSystemLabel": "KINGSTON",␍
"FileSystem": "FAT32",␍
"HealthStatus": "Healthy"␍
}␍
],␍
"SHA256": "8244F1189EFA02118BF0DC4CB68FC8924FE562AC610B68DEEFBE09EC85454D51"␍
}␍
@@ -0,0 +1,11 @@
{␍
"Result": "PASS",␍
"Model": "Kingston DataTraveler 3.0 USB Device",␍
"InterfaceType": "USB",␍
"PNPDeviceID": "USBSTOR\\DISK\u0026VEN_KINGSTON\u0026PROD_DATATRAVELER_3.0\u0026REV_PMAP\\408D5C1653D4E44179789251\u00260",␍
"DriveLetter": "F",␍
"TestDirectory": "F:\\VDI_USB_TEST_20261103-173342",␍
"LocalDirectory": "C:\\Windows\\TEMP\\VDI_USB_TEST_20261103-173342",␍
"Bytes": 1048576,␍
"SHA256": "8244F1189EFA02118BF0DC4CB68FC8924FE562AC610B68DEEFBE09EC85454D51"␍
}␍