Documentation
¶
Overview ¶
Package config 定义节点 Agent 配置。
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Master Master `yaml:"master"`
Xray Xray `yaml:"xray"`
Stats Stats `yaml:"stats"`
Update Update `yaml:"update"`
Heartbeat time.Duration `yaml:"heartbeat_interval"` // 心跳间隔
ReconnectMax time.Duration `yaml:"reconnect_max"` // 重连退避上限
// Phase T:内部账户与证书
AccountsPath string `yaml:"accounts_path"` // relay 内部账户持久化文件
CertsDir string `yaml:"certs_dir"` // push_cert 落盘根目录
// OutboxPath 流量上报发件箱(审计 F1):采集到的增量先落盘成批次,收到主控落库回执才删批。
// 空 = 纯内存(不落盘,进程重启即丢待上报流量),生产必须给路径。
OutboxPath string `yaml:"outbox_path"`
}
Config Agent 配置(对应 agent.yaml)。
type Stats ¶
type Stats struct {
APIAddr string `yaml:"api_addr"` // xray gRPC 地址,如 127.0.0.1:10085
CollectInterval time.Duration `yaml:"collect_interval"` // 采集周期
ReportInterval time.Duration `yaml:"report_interval"` // 上报周期
}
Stats 流量采集(对应 xray 配置中的 api 段)。
type Update ¶
type Update struct {
Repo string `yaml:"repo"` // owner/repo,空 = 内置默认
Mirror string `yaml:"mirror"` // 首选镜像/代理前缀,置顶尝试;失败自动切换内置候选列表
// DownloadTimeout 单镜像单次资产下载超时,0 = 默认 10m(慢链路可调大)。
DownloadTimeout time.Duration `yaml:"download_timeout"`
}
Update 自升级下载源(默认 GitHub: acdc-awa/XPanel-Node Releases)。
Click to show internal directories.
Click to hide internal directories.