chore(uninstall): also remove nexusgate-agent-go test unit; docs(README): Go agent memory/install notes

This commit is contained in:
aaaamoooo
2026-10-20 06:56:17 +00:00
parent d29b4f7ef1
commit 9c3789a1a4
2 changed files with 7 additions and 4 deletions
+4 -2
View File
@@ -13,7 +13,7 @@
- 3x-ui 式共享节点:nodes 状态机 + 每个客户独立凭据(`ng:<customerId>` 身份) - 3x-ui 式共享节点:nodes 状态机 + 每个客户独立凭据(`ng:<customerId>` 身份)
- 全面 sing-box:不再捆绑 xray - 全面 sing-box:不再捆绑 xray
- 按用户流量统计:AnyTLS 走日志解析,SS 走节点级 - 按用户流量统计:AnyTLS 走日志解析,SS 走节点级
- 内存优化:面板 `node --max-old-space-size=128 --optimize-for-size`,agent `--max-old-space-size=64 --optimize-for-size --max-semi-space-size=4`,sing-box `GOMEMLIMIT=64MiB GOGC=50` - 内存优化:面板 `node --max-old-space-size=128 --optimize-for-size`;Agent 为 Go 静态二进制(约 12MB,节点机无需 Node.js);sing-box `GOMEMLIMIT=64MiB GOGC=50`
## 安装 ## 安装
@@ -42,6 +42,8 @@ OpenWrt 上用 procd 常驻,见 `scripts/` 目录。
curl -fsSL https://raw.githubusercontent.com/aaaamoooo/NexusGate/main/scripts/agent-install.sh | bash -s -- --server https://主控域名 --token 你的TOKEN curl -fsSL https://raw.githubusercontent.com/aaaamoooo/NexusGate/main/scripts/agent-install.sh | bash -s -- --server https://主控域名 --token 你的TOKEN
``` ```
Agent 是 Go 静态二进制,安装时从 GitHub Release 下载,节点机不再需要安装 Node.js。(如需回退旧版 Node Agent,安装时加环境变量 `NG_AGENT_IMPL=node`。)
## 支持的协议 ## 支持的协议
VLESS / SS2022 / SS经典 / SOCKS5 / Hysteria2 / AnyTLS VLESS / SS2022 / SS经典 / SOCKS5 / Hysteria2 / AnyTLS
@@ -51,7 +53,7 @@ VLESS / SS2022 / SS经典 / SOCKS5 / Hysteria2 / AnyTLS
| 组件 | 内存 | | 组件 | 内存 |
|---|---| |---|---|
| 主控面板 | 约 61MB(OpenWrt 路由器) | | 主控面板 | 约 61MB(OpenWrt 路由器) |
| Agent | 57–82MB(含 Node 运行时;客户/流量越多越高) | | Agent | 约 12MB(Go 静态二进制) |
| sing-box | 16–36MB | | sing-box | 16–36MB |
## License ## License
+3 -2
View File
@@ -12,10 +12,11 @@ fi
if command -v systemctl >/dev/null && [[ -d /run/systemd/system ]]; then if command -v systemctl >/dev/null && [[ -d /run/systemd/system ]]; then
systemctl disable --now nexusgate-agent.service 2>/dev/null || true systemctl disable --now nexusgate-agent.service 2>/dev/null || true
systemctl disable --now nexusgate-agent-go.service 2>/dev/null || true
systemctl disable --now nexusgate-sing-box.service 2>/dev/null || true systemctl disable --now nexusgate-sing-box.service 2>/dev/null || true
systemctl disable --now nexusgate-cert-renew.timer 2>/dev/null || true systemctl disable --now nexusgate-cert-renew.timer 2>/dev/null || true
systemctl disable --now nexusgate-agent-logrotate.timer 2>/dev/null || true systemctl disable --now nexusgate-agent-logrotate.timer 2>/dev/null || true
rm -f -- /etc/systemd/system/nexusgate-agent.service /etc/systemd/system/nexusgate-sing-box.service /etc/systemd/system/nexusgate-cert-renew.service /etc/systemd/system/nexusgate-cert-renew.timer /etc/systemd/system/nexusgate-agent-logrotate.service /etc/systemd/system/nexusgate-agent-logrotate.timer rm -f -- /etc/systemd/system/nexusgate-agent.service /etc/systemd/system/nexusgate-agent-go.service /etc/systemd/system/nexusgate-sing-box.service /etc/systemd/system/nexusgate-cert-renew.service /etc/systemd/system/nexusgate-cert-renew.timer /etc/systemd/system/nexusgate-agent-logrotate.service /etc/systemd/system/nexusgate-agent-logrotate.timer
systemctl daemon-reload systemctl daemon-reload
fi fi
if command -v rc-service >/dev/null; then if command -v rc-service >/dev/null; then
@@ -31,6 +32,6 @@ rm -rf -- /opt/nexusgate-agent /etc/nexusgate /var/log/nexusgate
rm -f -- /etc/logrotate.d/nexusgate-agent rm -f -- /etc/logrotate.d/nexusgate-agent
rm -f -- /etc/letsencrypt/renewal-hooks/deploy/nexusgate-reload.sh rm -f -- /etc/letsencrypt/renewal-hooks/deploy/nexusgate-reload.sh
rm -f -- /usr/local/sbin/ng-agent /usr/local/sbin/ng-agent-update /usr/local/sbin/ng-agent-uninstall /usr/local/sbin/ng-agent-doctor /usr/local/sbin/ng-agent-cert /usr/local/sbin/ng-agent-singbox /usr/local/sbin/ng-agent-logrotate-setup /usr/local/bin/nexusgate-sing-box /usr/local/bin/nexusgate-sing-box-stats rm -f -- /usr/local/sbin/ng-agent /usr/local/sbin/ng-agent-update /usr/local/sbin/ng-agent-uninstall /usr/local/sbin/ng-agent-doctor /usr/local/sbin/ng-agent-cert /usr/local/sbin/ng-agent-singbox /usr/local/sbin/ng-agent-logrotate-setup /usr/local/bin/nexusgate-sing-box /usr/local/bin/nexusgate-sing-box-stats
printf 'NexusGate Agent 与其资源已删除。系统共用的 Node.js 和其他服务未删除。\n' printf 'NexusGate Agent 与其资源已删除。系统共用的运行时(如 Node.js)和其他服务未删除。\n'
printf 'Certbot 管理的证书仍保留;若曾使用 CF DNS 验证,其令牌已删除,保留的续签任务需另行配置或在确认没有其他服务使用后用 certbot delete 清理。\n' printf 'Certbot 管理的证书仍保留;若曾使用 CF DNS 验证,其令牌已删除,保留的续签任务需另行配置或在确认没有其他服务使用后用 certbot delete 清理。\n'
printf '请在控制台删除/遗忘此设备,以撤销其 Agent 密钥和登记。\n' printf '请在控制台删除/遗忘此设备,以撤销其 Agent 密钥和登记。\n'