feat(remote): 增加远端控制台与日志汇总导出
This commit is contained in:
@@ -56,6 +56,14 @@ type LogsResult struct {
|
||||
File string `json:"file"`
|
||||
}
|
||||
|
||||
// RemoteStatusResult reports the optional remote control connection state.
|
||||
type RemoteStatusResult struct {
|
||||
Enabled bool `json:"enabled"`
|
||||
Connected bool `json:"connected"`
|
||||
Message string `json:"message,omitempty"`
|
||||
LastConnect string `json:"lastConnect,omitempty"`
|
||||
}
|
||||
|
||||
// TimeResult 服务端/本地时间查询结果。
|
||||
type TimeResult struct {
|
||||
ServerTime string `json:"serverTime"`
|
||||
|
||||
@@ -3,9 +3,10 @@ package types
|
||||
// SharedProxyConfig 是跨实例、跨电脑同步的代理配置。
|
||||
// 该文件不包含代理 URL、代理过期时间、账号或 Cookie。
|
||||
type SharedProxyConfig struct {
|
||||
SchemaVersion int `json:"schemaVersion"`
|
||||
UpdatedAt string `json:"updatedAt,omitempty"`
|
||||
Proxy SharedProxySettings `json:"proxy"`
|
||||
SchemaVersion int `json:"schemaVersion"`
|
||||
UpdatedAt string `json:"updatedAt,omitempty"`
|
||||
Proxy SharedProxySettings `json:"proxy"`
|
||||
Remote SharedRemoteSettings `json:"remote,omitempty"`
|
||||
}
|
||||
|
||||
// SharedProxySettings 使用指针区分“未提供”与显式零值,支持部分配置覆盖。
|
||||
@@ -21,6 +22,15 @@ type SharedProxySettings struct {
|
||||
WhitelistSignKey *string `json:"whitelistSignKey,omitempty"`
|
||||
}
|
||||
|
||||
// SharedRemoteSettings 是本机或跨电脑共享的远端控制中心配置。
|
||||
// 令牌会写入共享 JSON 文件,调用方必须限制该文件权限并避免外部泄露。
|
||||
type SharedRemoteSettings struct {
|
||||
Enabled *bool `json:"enabled,omitempty"`
|
||||
URL *string `json:"url,omitempty"`
|
||||
Token *string `json:"token,omitempty"`
|
||||
MachineName *string `json:"machineName,omitempty"`
|
||||
}
|
||||
|
||||
// FileDialogResult 返回通过系统文件选择器选中的路径。
|
||||
type FileDialogResult struct {
|
||||
Success bool `json:"success"`
|
||||
|
||||
@@ -29,6 +29,10 @@ type Config struct {
|
||||
ProxyWhitelistReplace bool `json:"proxyWhitelistReplace"` // 白名单已满时替换最早 IP
|
||||
ProxyWhitelistPassword string `json:"proxyWhitelistPassword"` // 白名单签名使用的登录密码
|
||||
ProxyWhitelistSignKey string `json:"proxyWhitelistSignKey"` // 白名单签名使用的 AES 密钥
|
||||
RemoteEnabled bool `json:"remoteEnabled"` // 是否上报远端控制中心
|
||||
RemoteURL string `json:"remoteUrl"` // 远端控制中心根地址
|
||||
RemoteToken string `json:"remoteToken"` // 实例连接远端使用的令牌
|
||||
RemoteMachineName string `json:"remoteMachineName"` // 远端展示的机器名称,留空使用主机名
|
||||
}
|
||||
|
||||
// ProxyTestResult 代理测试结果。
|
||||
|
||||
Reference in New Issue
Block a user