feat(proxy): HTTP/SOCKS5 代理支持,按会话独立配置 | 15 files +483/-23 | 96/96 tests passing

功能:
- 代理类型定义 (ProxyType, ProxyConfig)
- 代理工具函数 (验证、解析、构建URL) + 24 测试
- SSH 连接通过 HTTP CONNECT / SOCKS5 隧道
- 数据库 proxy 列持久化 (JSON)
- SessionDialog 代理配置 UI (可折叠面板)
- 连接池传递 proxy 到 IPC
- sessionStore 类型添加 proxy 支持
This commit is contained in:
OpsXShell Dev committed 2026-04-25 05:14:27 +08:00
1 parent 3f636b1b0e
commit 07c4a5b14f
15 files changed
+757 -23

No files matched your search

+1
View File
@@ -142,6 +142,7 @@ export const usePoolStore = create<PoolState>((set, get) => ({
password: config.password,
privateKey: config.privateKey,
passphrase: config.passphrase,
proxy: config.proxy,
})
console.log('>>> sshConnect result:', result)
+1
View File
@@ -27,6 +27,7 @@ export async function getSessionConfig(sessionId: string): Promise<ConnectionCon
privateKey: session.privateKey,
passphrase: session.passphrase,
authType: session.authType,
proxy: session.proxy,
}
} catch (error) {
logger.error('Failed to get session config:', error)
+7
View File
@@ -17,6 +17,13 @@ export interface Session {
password?: string
privateKey?: string
passphrase?: string
proxy?: {
type: 'none' | 'http' | 'socks5'
host: string
port: number
username?: string
password?: string
}
group?: string
tags?: string[]
}