feat: v0.3.0 版本 - SSH终端、SFTP、端口转发功能实现
核心功能: - SSH终端: 密码/密钥认证、XTerm.js终端、多主题配色、IP高亮 - SFTP管理: 双栏文件管理、上传下载、传输队列 - 端口转发: 本地/远程转发、SOCKS5动态代理、规则管理 架构改进: - 拆分大型组件 (SFTPView/TabBar/Sidebar) - 添加统一日志和错误处理 - 修复React严格模式下的终端黑屏问题 UI更新: - 新增端口转发视图 - 更新UI预览文档 - 左侧栏右键菜单支持SFTP快捷打开
This commit is contained in:
1 parent
cf1c054381
commit
484d850abd
105 files changed
+25330
-64
No files matched your search
@@ -0,0 +1,51 @@
|
||||
/**
|
||||
* Session Types - 统一的会话类型定义
|
||||
* 在主进程和渲染进程间共享
|
||||
*/
|
||||
|
||||
// 认证方式
|
||||
export type AuthType = 'password' | 'key' | 'agent'
|
||||
|
||||
// 会话配置 (用于快速连接)
|
||||
export interface SSHConnectionConfig {
|
||||
host: string
|
||||
port: number
|
||||
username: string
|
||||
password?: string
|
||||
privateKey?: string
|
||||
passphrase?: string
|
||||
}
|
||||
|
||||
// 持久化会话
|
||||
export interface Session {
|
||||
id: string
|
||||
name: string
|
||||
host: string
|
||||
port: number
|
||||
username: string
|
||||
authType: AuthType
|
||||
password?: string // 加密存储
|
||||
privateKey?: string // 私钥路径或内容
|
||||
passphrase?: string // 私钥密码
|
||||
group?: string
|
||||
tags?: string[]
|
||||
createdAt?: number
|
||||
updatedAt?: number
|
||||
}
|
||||
|
||||
// 会话创建请求
|
||||
export interface SessionCreateRequest {
|
||||
name: string
|
||||
host: string
|
||||
port: number
|
||||
username: string
|
||||
authType: AuthType
|
||||
password?: string
|
||||
privateKey?: string
|
||||
passphrase?: string
|
||||
group?: string
|
||||
tags?: string[]
|
||||
}
|
||||
|
||||
// 会话更新请求
|
||||
export type SessionUpdateRequest = Partial<Omit<Session, 'id' | 'createdAt' | 'updatedAt'>>
|
||||
Reference in new issue
Block a user