Skip to content

哪吒面板兼容版: 基于 V0 版本提供 V1 的面板 API 。

License

Notifications You must be signed in to change notification settings

chenx-dust/nezha-compat

 
 

Repository files navigation



LOGO designed by 熊大 .

GitHub release (with filter)

:trollface: Nezha Dashboard Compat: Based on V0, Provide V1 Dashboard API.

:trollface: 哪吒面板兼容版: 基于 V0 版本提供 V1 的面板 API 。

Forked from: nezhahq/nezha:v0-final

Usage / 用法

Just like original Nezha Monitoring, to install or upgrade from original version:

和原版类似,要安装或者从原版中升级到兼容版:

curl -L https://raw.githubusercontent.com/chenx-dust/nezha-compat/compat/script/install.sh -o nezha.sh && chmod +x nezha.sh && sudo ./nezha.sh

Then follow the prompt. English version temporarily not provided.

然后跟随指引即可。暂不提供英语版本。

Compatible API / 兼容 API

所有已实现的 v1 API 在文件 compat_v1.go 中。目前支持了:

  • 前台界面的所有 API (包括 WebSocket)
  • 后台界面的部分只读 API
    • 支持基于 API Key 的登录
    • 支持服务器、告警、通知的信息获取
    • 可以兼容 hiDandelion/Nezha-Mobile 的大部分只读功能
  • 关于鉴权
    • 基于 API Key 实现的鉴权
    • 支持模仿 /api/v1/login 接口实现登录
      • 账号: API Key
      • 密码: 任意
    • 支持三种提供 API Key 的方式
      • Cookie: nz-jwt (v1 版本默认使用)
      • Header: Authorization: Bearer <API Key> (v1 版本 API 使用)
      • Header: Authorization: <API Key> (v0 版本 API 使用)
    • 由于 API Key 鉴权方式较弱,故没有实现任何可能造成副作用的 API (如:终端、修改参数等)

Acknowledge / 致谢

About

哪吒面板兼容版: 基于 V0 版本提供 V1 的面板 API 。

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Languages

  • Go 80.3%
  • Shell 9.8%
  • JavaScript 8.1%
  • CSS 1.6%
  • Dockerfile 0.2%