feat(rustdesk): 完整实现RustDesk协议和P2P连接

重大变更:
- 从prost切换到protobuf 3.4实现完整的RustDesk协议栈
- 新增P2P打洞模块(punch.rs)支持直连和中继回退
- 重构加密系统:临时Curve25519密钥对+Ed25519签名
- 完善HID适配器:支持CapsLock状态同步和修饰键映射
- 添加音频流支持:Opus编码+音频帧适配器
- 优化视频流:改进帧适配器和编码器协商
- 移除pacer.rs简化视频管道

扩展系统:
- 在设置向导中添加扩展步骤(ttyd/rustdesk切换)
- 扩展可用性检测和自动启动
- 新增WebConfig handler用于Web服务器配置

前端改进:
- SetupView增加第4步扩展配置
- 音频设备列表和配置界面
- 新增多语言支持(en-US/zh-CN)
- TypeScript类型生成更新

文档:
- 更新系统架构文档
- 完善config/hid/rustdesk/video/webrtc模块文档
This commit is contained in:
mofeng-git
2026-01-03 19:34:07 +08:00
parent cb7d9882a2
commit 0c82d1a840
49 changed files with 5470 additions and 1983 deletions

View File

@@ -19,6 +19,8 @@ export default {
off: 'Off',
enabled: 'Enabled',
disabled: 'Disabled',
later: 'Later',
restartNow: 'Restart Now',
connected: 'Connected',
disconnected: 'Disconnected',
connecting: 'Connecting...',
@@ -202,6 +204,7 @@ export default {
// Step titles
stepAccount: 'Account Setup',
stepVideo: 'Video Setup',
stepAudioVideo: 'Audio/Video Setup',
stepHid: 'HID Setup',
// Account
setUsername: 'Set Admin Username',
@@ -220,6 +223,12 @@ export default {
fps: 'Frame Rate',
selectFps: 'Select FPS',
noVideoDevices: 'No video devices detected',
// Audio
audioDevice: 'Audio Device',
selectAudioDevice: 'Select audio capture device',
noAudio: 'No audio',
noAudioDevices: 'No audio devices detected',
audioDeviceHelp: 'Select the audio capture device for capturing remote host audio. Usually on the same USB device as the video capture card.',
// HID
hidBackend: 'HID Backend',
selectHidBackend: 'Select HID control method',
@@ -249,6 +258,15 @@ export default {
otgHelp: 'USB OTG mode emulates HID devices directly through USB Device Controller. Requires hardware OTG support.',
videoDeviceHelp: 'Select the video capture device for capturing the remote host display. Usually an HDMI capture card.',
videoFormatHelp: 'MJPEG has best compatibility. H.264/H.265 uses less bandwidth but requires encoding support.',
// Extensions
stepExtensions: 'Extensions',
extensionsDescription: 'Choose which extensions to auto-start',
ttydTitle: 'Web Terminal (ttyd)',
ttydDescription: 'Access device command line in browser',
rustdeskTitle: 'RustDesk Remote Desktop',
rustdeskDescription: 'Remote access via RustDesk client',
extensionsHint: 'These settings can be changed later in Settings',
notInstalled: 'Not installed',
// Password strength
passwordStrength: 'Password Strength',
passwordWeak: 'Weak',
@@ -436,7 +454,7 @@ export default {
buildInfo: 'Build Info',
detectDevices: 'Detect Devices',
detecting: 'Detecting...',
builtWith: 'Built with Rust + Vue 3 + shadcn-vue',
builtWith: "Copyright {'@'}2025 SilentWind",
networkSettings: 'Network Settings',
msdSettings: 'MSD Settings',
atxSettings: 'ATX Settings',
@@ -444,6 +462,17 @@ export default {
httpSettings: 'HTTP Settings',
httpPort: 'HTTP Port',
configureHttpPort: 'Configure HTTP server port',
// Web server
webServer: 'Basic',
webServerDesc: 'Configure HTTP/HTTPS ports and bind address. Restart required for changes to take effect.',
httpsPort: 'HTTPS Port',
bindAddress: 'Bind Address',
bindAddressDesc: 'IP address the server listens on. 0.0.0.0 means all network interfaces.',
httpsEnabled: 'Enable HTTPS',
httpsEnabledDesc: 'Enable HTTPS encrypted connection (self-signed certificate will be auto-generated)',
restartRequired: 'Restart Required',
restartMessage: 'Web server configuration saved. A restart is required for changes to take effect.',
restarting: 'Restarting...',
// User management
userManagement: 'User Management',
userManagementDesc: 'Manage user accounts and permissions',
@@ -528,6 +557,16 @@ export default {
hidBackend: 'HID Backend',
serialDevice: 'Serial Device',
baudRate: 'Baud Rate',
// OTG Descriptor
otgDescriptor: 'USB Device Descriptor',
otgDescriptorDesc: 'Configure USB device identification',
vendorId: 'Vendor ID (VID)',
productId: 'Product ID (PID)',
manufacturer: 'Manufacturer',
productName: 'Product Name',
serialNumber: 'Serial Number',
serialNumberAuto: 'Auto-generated',
descriptorWarning: 'Changing these settings will reconnect the USB device',
// WebRTC / ICE
webrtcSettings: 'WebRTC Settings',
webrtcSettingsDesc: 'Configure STUN/TURN servers for NAT traversal',
@@ -626,7 +665,7 @@ export default {
binaryNotFound: '{path} not found, please install the required program',
// ttyd
ttyd: {
title: 'Web Terminal',
title: 'Ttyd Web Terminal',
desc: 'Web terminal access via ttyd',
open: 'Open Terminal',
openInNewTab: 'Open in New Tab',
@@ -636,7 +675,7 @@ export default {
},
// gostc
gostc: {
title: 'NAT Traversal',
title: 'GOSTC NAT Traversal',
desc: 'NAT traversal via GOSTC',
addr: 'Server Address',
key: 'Client Key',
@@ -644,7 +683,7 @@ export default {
},
// easytier
easytier: {
title: 'P2P Network',
title: 'Easytier Network',
desc: 'P2P VPN networking via EasyTier',
networkName: 'Network Name',
networkSecret: 'Network Secret',
@@ -664,6 +703,10 @@ export default {
relayServer: 'Relay Server',
relayServerPlaceholder: 'hbbr.example.com:21117',
relayServerHint: 'Relay server address, auto-derived from ID server if empty',
relayKey: 'Relay Key',
relayKeyPlaceholder: 'Enter relay server key',
relayKeySet: '••••••••',
relayKeyHint: 'Authentication key for relay server (if server uses -k option)',
publicServerInfo: 'Public Server Info',
publicServerAddress: 'Server Address',
publicServerKey: 'Connection Key',