58 lines
1.2 KiB
Plaintext
58 lines
1.2 KiB
Plaintext
// Data structure definitions for the proxy management application
|
||
|
||
// 配置文件信息
|
||
export struct Profile {
|
||
id: string,
|
||
name: string,
|
||
url: string,
|
||
type: string, // "remote" | "local"
|
||
updated-at: string,
|
||
usage: string, // "1.26GB / 100GB"
|
||
expire-at: string,
|
||
selected: bool,
|
||
}
|
||
|
||
// 代理节点
|
||
export struct ProxyNode {
|
||
name: string,
|
||
type: string, // "Vmess", "Shadowsocks", etc.
|
||
delay: int, // 延迟 ms,-1 表示未测试
|
||
udp: bool,
|
||
}
|
||
|
||
// 代理组
|
||
export struct ProxyGroup {
|
||
name: string,
|
||
type: string, // "Selector", "URLTest", etc.
|
||
now: string, // 当前选中的节点
|
||
nodes: [ProxyNode],
|
||
}
|
||
|
||
// 连接信息
|
||
export struct Connection {
|
||
id: string,
|
||
host: string,
|
||
process: string,
|
||
rule: string,
|
||
chains: string,
|
||
upload: string,
|
||
download: string,
|
||
time: string,
|
||
}
|
||
|
||
// 日志条目
|
||
export struct LogEntry {
|
||
time: string,
|
||
level: string, // "debug", "info", "warn", "error"
|
||
message: string,
|
||
}
|
||
|
||
// 设置项
|
||
export struct SettingItem {
|
||
key: string,
|
||
label: string,
|
||
value: string,
|
||
type: string, // "switch", "select", "button", "text"
|
||
enabled: bool,
|
||
}
|