mirror of
https://github.com/Buriburizaem0n/nezha_domains.git
synced 2026-09-19 09:40:12 +00:00
e8dabf5bc608e188811de412dff008b3b457460a
Introduce Personal Access Tokens (nzp_*) as a stateless auth path alongside
JWT, gated per-endpoint by a scope middleware (nezha:{resource}:{verb}) with
fail-closed empty-scope defaults and a server-id whitelist. Self-management
endpoints (profile, api-tokens, oauth2 bind, refresh-token) explicitly reject
PATs to block privilege-escalation chains. A revoke registry tears down active
long-lived connections (terminal, fm, ws, transfer, mcp) the moment a PAT is
deleted, with a tombstone closing the revoke->register race.
Add an MCP endpoint that proxies tool calls (exec, fs read/write/delete,
transfer) to agents over gRPC, guarded by origin/DNS-rebinding checks, a
per-token rate limiter, audit logging, and a kill switch. Serialize all
sends through the IOStream wrapper to honour grpc-go's concurrency contract.
Add CSRF double-submit protection on unsafe cookie-authenticated methods,
exempting authenticated PAT requests by context identity (not a forgeable
Authorization header). Apply visibility/whitelist filtering consistently
across list, get-by-id, and mutate paths to enforce tenant isolation.
Migrate legacy mcp:* scopes: rewrite read/exec to nezha:* equivalents and
drop dangerous write/delete/wildcard grants.
Co-authored-by: cloudcode <cloudcode@users.noreply.github.com>
LOGO designed by 熊大 .
:trollface: Nezha Monitoring: Self-hostable, lightweight, servers and websites monitoring and O&M tool.
Supports monitoring system status, HTTP (SSL certificate change, upcoming expiration, expired), TCP, Ping and supports push alerts, run scheduled tasks and web terminal.
>> Telegram Channel: 哪吒监控(中文通知频道)
>> Telegram Group: Nezha Monitoring Global (English Only), 哪吒监控(中文群组)
>> Use Cases | 我们的用户 (Google)
User Guide
Contributing
Translation
Is Nezha not in your language, or the translation is incorrect or incomplete? Get involved in the translations on Hosted Weblate.
Screenshots
| 用户前台 @hamster1963 | 管理后台 @nezhahq |
|---|---|
![]() |
![]() |
| hamster1963/nezha-dash | nezhahq/admin-frontend |
add your theme to service/singleton/frontend-templates.yaml
Contributors
Special Thanks
- IPInfo for providing an accurate GeoIP Database.
Star History
Languages
Go
99.3%
Shell
0.5%
PowerShell
0.2%

