Commit Graph
4016 Commits
Author SHA1 Message Date
Sam5440andnaiba/CloudCode 8721a15b12 feat(server): online session history with configurable stats window (#1243)
Add persisted online sessions, configurable retention and online history statistics with lifecycle, recovery, timezone and concurrency regression coverage.

Co-authored-by: naiba/CloudCode <hi+cloudcode@nai.ba>
2026-10-16 19:25:13 +08:00
naiba 9881c47f0c chore: upgrade frontend 2026-10-04 20:03:52 +08:00
naiba ec637a688c docs: replace sponsors with placeholder 2026-10-01 16:37:10 +00:00
Krisandnaiba 8328047aa8 fix(alerts): evaluate fresh reports and order notification delivery (#1242)
* fix(alerts): evaluate fresh reports and make notification transitions reliable

* fix(alerts): identify equal-timestamp reports by sequence

* fix(alerts): preserve notification transition semantics

---------

Co-authored-by: naiba <hi@nai.ba>
2026-10-02 00:31:32 +08:00
naiba 1420dd450c fix(nat): bound dashboard credential classification 2026-10-01 11:48:23 +00:00
github-actions[bot] 34ac50394d update contributors[no ci] 2026-10-01 19:26:01 +08:00
naiba b71188f104 Merge pull request #1241 from xvkong233/fix/nat-selective-authorization-strip
fix(nat): strip only dashboard-issued Authorization credentials at NAT ingress
2026-10-01 19:25:36 +08:00
xvkong233 3ad985f36e fix(nat): scrub dashboard-issued credentials from all accepted token channels
The initial selective strip covered only the Authorization header, but the
dashboard also accepts its JWT via the ?token= query parameter and the
nz-jwt cookie (jwt.go TokenLookup channels). A dashboard credential arriving
through those channels would still reach a NAT backend.

Apply the same classify-then-strip rule to all three channels at NAT
ingress: values verified as dashboard-issued are removed, foreign values
are preserved byte-for-byte. Adds a ServeNAT flow test exercising the live
classifier and a wiring test pinning the gate injection in main().
2026-10-01 11:17:45 +00:00
xvkong233 40240ed02b fix(nat): strip only dashboard-issued Authorization credentials at NAT ingress
Since 2640b86 (v2.2.11, 2026-07-20) the NAT ingress deleted the entire
Authorization header, breaking self-hosted apps behind the tunnel that
authenticate with their own Bearer tokens (e.g. the Qinglong panel login
loop).

Strip only credentials issued by this dashboard and forward foreign ones:

- controller.IsDashboardCredential classifies an Authorization value as
  dashboard-issued via a signature-only JWT parser derived from the auth
  middleware (same key, HS256 pinned, claims validation deliberately
  skipped so an expired panel token is still recognized and kept out of
  the tunnel) or an api_tokens lookup for PAT-shaped values. Unknown PATs,
  foreign signatures, other schemes and missing values pass through. When
  classification cannot complete (parser not ready, DB nil or error) the
  verdict fails closed (strip) and the log carries a fixed reason only,
  never credential content.
- Both NAT capability variants (default, and agent-compat legacy /
  invalid-capability / post-consume paths) replace the unconditional
  Del("Authorization") with stripDashboardCredential. The rpc package
  receives the classifier through SetNATDashboardCredentialGate, the same
  injection pattern as SetMCPKillSwitchObserver; an unwired gate keeps the
  historical strip-everything behavior.

Tests: controller classification semantics (panel JWT, expired panel JWT
and panel PAT stripped; foreign-signed JWT, unknown nzp_ token, random
strings, non-Bearer schemes and missing header pass through; parser
unavailable, DB nil and DB error fail closed with credential-free logs)
plus rpc unit and flow coverage for both variants (dashboard credentials
never reach the forwarded bytes; foreign and missing Authorization are
forwarded untouched).

Compatibility: no API, database or frontend changes; NAT backends that do
not use Authorization behave exactly as before.
2026-10-01 11:17:45 +00:00
naiba 36b742a7e9 fix: harden dashboard security boundaries 2026-10-01 04:28:34 +00:00
naiba c726930833 chore: update frontend 2026-09-26 10:26:05 +08:00
naiba 9dab6a5039 fix: harden notification cache synchronization 2026-09-19 10:44:17 +00:00
github-actions[bot] 589f01f562 update contributors[no ci] 2026-09-14 11:23:19 +08:00
naiba e202c2d9ca Merge pull request #1237 from 77-QiQi/master
Improve: Delete the corresponding DNS record if the IPv4/IPv6 address is empty.
2026-09-14 11:22:52 +08:00
77-QiQi fa611ebd9e Update ddns_test.go 2026-09-14 11:06:44 +08:00
77-QiQi 39e1c6d1be Update ddns_test.go 2026-09-14 10:57:37 +08:00
77-QiQi c19e8eb252 Update ddns_test.go 2026-09-14 10:51:01 +08:00
77-QiQi db78c34b91 Update ddns_test.go 2026-09-14 10:43:36 +08:00
77-QiQi e9ddd46655 Update ddns_test.go 2026-09-14 10:36:04 +08:00
77-QiQi 09db8b4361 Update ddns_test.go 2026-09-14 10:29:08 +08:00
77-QiQi ed9f21e4ea Update ddns_test.go 2026-09-14 10:13:10 +08:00
77-QiQi f611f0a551 Update ddns_test.go 2026-09-14 10:04:38 +08:00
77-QiQi 19d959c60d Update ddns.go 2026-09-14 10:02:03 +08:00
77-QiQi 02fe54bb80 Update ddns_test.go 2026-09-14 09:10:17 +08:00
77-QiQi 0a71cbdb63 Update ddns_test.go 2026-09-14 08:56:04 +08:00
77-QiQi dd0b598dc3 Update ddns_test.go 2026-09-14 08:50:08 +08:00
77-QiQi 892619c95c Update ddns_test.go 2026-09-14 08:39:52 +08:00
77-QiQi cbc583dd3a Update ddns.go 2026-09-14 08:39:22 +08:00
77-QiQi f2f10ea7bc Update ddns.go 2026-09-13 20:55:03 +08:00
77-QiQi b18e085a2c Merge branch 'nezhahq:master' into master 2026-09-13 20:53:20 +08:00
naiba 06d387779d fix(tsdb): survive low disk space 2026-09-13 01:15:18 +00:00
github-actions[bot] 1155c17573 update contributors[no ci] 2026-09-12 22:59:36 +08:00
NikoCat233 d19952a834 feat(auth): allow JWT IP changes by configuration (#1236)
* feat(auth): allow JWT IP changes by configuration

* fix(auth): make JWT IP change setting concurrency-safe

* test(auth): move JWT IP change setting tests out of MCP test file
2026-09-12 22:59:17 +08:00
naiba 46d83d6d68 style(ddns): apply gofmt 2026-09-12 13:29:44 +00:00
naiba 8cb86e3853 chore(frontend-templates): update frontend versions 2026-09-12 11:11:22 +00:00
github-actions[bot] 5d5830fef3 update contributors[no ci] 2026-09-12 18:56:54 +08:00
Ryrenz f366677744 feat: surface GPU memory in host state (#1235)
- Add State_GPU message to the proto with utilization and memory fields
- Add HostState.GPUs with conversion in both PB() and PB2State()
- Keep the existing gpu field populated so older agents keep working

Regenerated with protoc-gen-go v1.34.2 / protoc v5.29.3 to match the
existing files; nezha_grpc.pb.go is untouched since the service is
unchanged.

Closes #1217
2026-09-12 18:56:35 +08:00
77-QiQi c684388153 Improve: Delete the corresponding DNS record if the IPv4/IPv6 address is empty. 2026-09-08 12:07:23 +08:00
naiba eb48a178f8 ci: use latest compatible Go patch 2026-09-02 13:45:05 +00:00
naiba f2e8d03667 ci: pin Go 1.26.6 2026-09-02 13:35:11 +00:00
naiba d6d5b9804d chore(frontend-templates): update frontend versions 2026-09-02 13:30:46 +00:00
naiba 19daf4ad3c fix(alert): prevent persisted rule crash loops 2026-09-02 13:30:46 +00:00
naiba 8f1147c800 chore(deps): update direct dependencies 2026-09-02 13:30:46 +00:00
naiba fffbe68650 docs: add AxisNow sponsor 2026-09-01 08:16:45 +00:00
naiba b523961cee docs: add sponsors to README 2026-08-31 07:05:06 +00:00
github-actions[bot] 1405ba76e5 update contributors[no ci] 2026-08-17 11:55:03 +08:00
77-QiQi 28d731265c improve: skip empty addresses during DDNS updates (#1231) 2026-08-17 11:54:39 +08:00
naiba e88650281b ci(release): support registries without attestations 2026-08-15 05:37:12 +00:00
naiba a4f8eaf0ff chore(frontend-templates): update frontend versions 2026-08-15 05:20:28 +00:00
naiba 38824dbc11 fix(security): restrict service monitors to probe tasks 2026-08-15 05:00:28 +00:00