Documentation
¶
Overview ¶
Package cli 提供 xray-agent 的管理子命令:status / restart / logs / uninstall / help。 无参数或 run 走主循环(见 cmd/agent/main.go)。
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsSystemdManaged ¶
func IsSystemdManaged() bool
IsSystemdManaged 判断本机是否安装了 xray-agent 的 systemd 单元(无论服务是否在运行)。
func IsSystemdService ¶
func IsSystemdService() bool
IsSystemdService 判断当前进程是否由 systemd 拉起:服务进程带 INVOCATION_ID 环境变量, 终端手动执行无此变量——用于区分「服务内启动」与「交互式误启动」。
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.