Files
easynode/server
dependabot[bot] 10859f192d chore(deps): bump axios from 1.13.5 to 1.16.0
Bumps [axios](https://github.com/axios/axios) from 1.13.5 to 1.16.0.
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md)
- [Commits](https://github.com/axios/axios/compare/v1.13.5...v1.16.0)

---
updated-dependencies:
- dependency-name: axios
  dependency-version: 1.16.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-06-13 10:58:39 +00:00
..
2026-06-07 00:01:54 +08:00
2024-07-11 12:13:33 +08:00
2025-04-17 22:11:28 +08:00
2026-05-31 00:06:46 +08:00
2025-11-24 23:34:43 +08:00
2026-06-07 18:21:18 +08:00

面板服务端

  • 基于Koa

HTTPS 配置

服务支持三种 HTTPS 配置模式:

  • 模式 0: 关闭 HTTPS (默认)
  • 模式 1: 自动生成自签名证书
  • 模式 2: 使用自定义证书路径

详细配置说明请查看: HTTPS 配置文档

快速开始:

# .env 文件
ENABLE_HTTPS=1  # 0:关闭 1:自签证书 2:传入证书路径
HTTPS_PORT=8092

遇到的问题

MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 input listeners added to [Socket]. Use emitter.setMaxListeners() to increase limit

  • ssh连接数过多(默认最多11个)
  • 每次连接新建一个vps实例,断开则销毁

Error signing data with key: error:0D07209B:asn1 encoding routines:ASN1_get_object:too long

  • 经比对,ssh的rsa密钥在前端往后端的存储过程中丢失了部分字符

获取客户端信息:跨域请求客户端系统信息,建立ws socket实时更新网络

  • 问题:服务端前端套上https后,前端无法请求客户端(http)的信息, 也无法建立ws socket连接(原因是https下无法建立http/ws协议请求)
  • 方案1: 所有客户端与服务端通信,再全部由服务端与前端通信(考虑:服务端/客户端性能问题). Node实现http+https||nginx转发实现https
  • 方案2: 给所有客户端加上https(客户端只有ip,没法给个人ip签订证书)

构建运行包

坑

log4js: 该module使用到了fs.mkdir()等读写api,pkg打包后的环境不支持,设置保存日志的目录需使用process.cwd()】

win闪退: 在linux机器上构建可查看输出日志

客户端

构建客户端服务, 后台运行 nohup ./easynode-server &

功能:服务器基本信息【ssh信息保存在主服务器】