Commit Graph
30 Commits
Author SHA1 Message Date
naiba 6b88cdb012 feat: server transfer rotation 2026-05-25 10:17:34 +00:00
naibaandnaiba/CloudCode 1efe2bf053 fix(rpc): allow global agent secret across server owners
Co-authored-by: naiba/CloudCode <hi+cloudcode@nai.ba>
2026-05-19 01:58:53 +00:00
naibaandnaiba/CloudCode 7c493e8f0b fix(rpc): verify gRPC client UUID belongs to the agent secret owner
Auth.Check resolved client_uuid → server.ID via UUIDToID without
checking that the resolved server's UserID matched the user that the
secret was bound to. An agent presenting one user's secret could
target a different user's server UUID and impersonate it — poisoning
monitoring state, triggering alerts, or quietly receiving tasks the
real owner expected.

Add authorizeAgentForUUID: if the UUID is unknown we still allow new
registration bound to the secret owner; if the UUID is known but
points to someone else's server we reject. The rejection message
"client UUID does not belong to the agent secret owner" also helps
operators trace which user's secret has leaked.

Note: this changes runtime behaviour after batch-move/server — the
new owner must reconfigure agents with their own secret. That is the
correct contract; the previous behaviour was a cross-user reporting
bug.

Co-authored-by: naiba/CloudCode <hi+cloudcode@nai.ba>
2026-05-18 15:17:37 +00:00
UUBulb ea068d4db1 refactor: simplify server & service manipulation (#993)
* refactor: simplify server & service manipulation

* update

* fix

* update for nat, ddns & notification

* chore

* update cron

* update dependencies

* use of function iterators

* update default dns servers
2025-02-21 23:08:12 +08:00
UUBulb b75a49c3c6 feat: edit server config online (#980)
* feat: edit server config online

* clean

* refactor

* generate template

* fix deadlocks

* fix
2025-01-31 13:33:53 +08:00
naiba c5cb385dc3 chore: refactor 2025-01-04 12:32:29 +08:00
UUBulb d70cfe9ee9 bug fixes (#918)
* bug fixes

* fix for backward compatibility

* fix init

* cleanup

* possible fix

* optimize permission check

* Revert "possible fix"

This reverts commit 003f1bbb2aa368aade6702e6019922b7f4871a39.
2024-12-26 23:38:40 +08:00
naiba 72e3406ac0 feat: upgrade frontend 2024-12-25 21:02:54 +08:00
UUBulb dc0132c9aa feat: user roles (#852)
* [WIP] feat: user roles

* update

* update

* admin handler

* update

* feat: user-specific connection secret

* simplify some logics

* cleanup

* update waf

* update user api error handling

* update waf api

* fix codeql

* update waf table

* fix several problems

* add pagination for waf api

* update permission checks

* switch to runtime check

* 1

* cover?

* some changes
2024-12-22 00:05:41 +08:00
UUBulb 47099b617e fix: allocate geoip on server creation (#554) 2024-12-05 17:07:31 +08:00
naiba 4861b3e013 feat: refactor grpc keepalive 2024-12-05 00:11:34 +08:00
naiba a7e4fe0909 rename repo 2024-11-28 19:38:54 +08:00
naiba 6db1a4b19d improve: use stream reduce auth check time 2024-11-23 12:43:02 +08:00
naiba 546685320f Merge branch 'dev' of github.com:naiba/nezha-v1 into dev 2024-11-22 23:57:48 +08:00
naiba 909cd92e9a feat: waf 🤡 2024-11-22 23:57:25 +08:00
UUBulb 13810bb38b report geoip separately, fix server creation & deletion bugs (#14)
* new geoip method

* report geoip separately, fix server creation & deletion bugs

* fix struct tag

* fix write name

* remove deleteion list

* remove rpc realip header

* Revert "remove rpc realip header"

This reverts commit 8a5f86cf2d7df87f28cfa2a3b3430f449dd6ed73.
2024-11-22 22:40:43 +08:00
naiba f5776c7464 feat: grpc / web get real ip 2024-11-22 00:19:36 +08:00
naiba c5bacf3e84 fix agent connect 2024-10-22 23:44:50 +08:00
naiba 80740ddf39 refactor agent auth & server api 2024-10-20 23:23:04 +08:00
naiba 2a35a6f0e5 feat: 去除 webTerminal 的 websocket 依赖 2024-07-14 12:47:36 +08:00
naiba 5bdfc0e052 theme-mdui by @MikoyChinese 2022-01-09 11:54:14 +08:00
naiba c4257ad105 🐛 修复修改服务器导致 Agent 离线 2021-07-25 23:50:08 +08:00
naiba a08e3fa1f1 🔨 开启 pprof、优化 agent 2021-05-10 18:04:38 +08:00
naiba 3c76bb4651 ♻️ v4: 去掉添加 Agent ID 要求 需要更新面板 close #83 2021-01-30 17:10:51 +08:00
naiba 8cc5d1c32b 💥 v2.0 必须更新面板,新增服务监控 2021-01-16 00:45:49 +08:00
naiba 1d2c81ead2 feat: 展示排序 close #29 2021-01-08 21:04:50 +08:00
naiba a4611beaec 🚚 from p14yground to naiba 2020-11-11 10:07:45 +08:00
奶爸 db364099fb 展示服务器列表 2019-12-09 18:14:31 +08:00
奶爸 f7d7e9ef49 客户端授权验证 2019-12-09 16:02:49 +08:00
奶爸 f2f840de4a Web 服务 2019-12-08 16:59:58 +08:00