Commit Graph
20 Commits
Author SHA1 Message Date
aaaamoooo 3de4c4945f fix(panel-go): random ports roll once — sticky across edits (round-2 #7)
NormalizeNode re-selected ports whenever the request merely CONTAINED
port/serverId keys; the browser form always submits them (port=null in
random mode), so every save re-rolled both entry and exit ports. Now an
assigned port only moves on an explicit addressing change: mode switch to
random, a different fixed port value, or a server move where the port is
taken (fixed mode surfaces the 409). random->fixed pins the current port.

Regression: portlock_test.go (UI-shape payload saved twice, rename-only,
mode switches, fixed change/conflict, server move free/taken).
Golden re-captured: diff confined to nodePatchUiStyle/nodePatchJobs/
nodesAfterPatch/backup port leaves returning to the seed ports.
2026-10-21 11:17:59 +08:00
aaaamoooo 85763ebdb7 test(panel-go): freeze Go golden behavior baseline (Node retired, difftest superseded)
Single-source Go from this round on: golden.mjs replays a fixed API script
against a Go panel seeded from the difftest seed DB and diffs every response
(learning-normalized) against golden.json. 25 sections: lists, credentials,
all subscription formats, deploy job payloads, usage/presence, UI-style node
PATCH, /api/system shape, backup, error cases.
2026-10-21 11:17:59 +08:00
aaaamoooo 612035ac4e docs: UI reskin report
CI / test (push) Canceled after 0s
CI / anytls-smoke (push) Canceled after 0s
2026-10-21 03:16:31 +08:00
aaaamoooo 0a2889b4e4 feat(web): 3x-ui style reskin — amo branding, light/dark themes, four pages + tabbed customer form 2026-10-21 03:16:30 +08:00
aaaamoooo d287bb9be9 feat(panel): reskin backend — node sortIndex, presence/speed, /api/system, credentials, subscription aggregation (Node+Go parity) 2026-10-21 03:16:30 +08:00
aaaamoooo c6f6b9dbea feat(panel-go): monthly traffic reset for customers
- trafficResetDay/Period/At on the shared customer record (omitempty,
  inert for the Node panel, which preserves unknown fields)
- housekeeping applies due resets before quota evaluation: period-key
  idempotency, short-month clamping (31st fires Feb 28), missed-period
  catch-up after panel downtime, traffic suspensions auto-resume
- first sight of a schedule only arms the period marker, never zeroes;
  API create/PATCH accept trafficResetDay (0=off) and re-arm on change
- UI: reset-day input + last-reset display in the customer form
- tests: calendar math, apply pass, API lifecycle, persistence;
  full Go/Node suites green, difftest formal 50/50
2026-10-21 03:16:30 +08:00
aaaamoooo f4ef3d96a6 chore: migrate self-distribution links from GitHub to self-hosted Gitea
CI / test (push) Canceled after 0s
CI / anytls-smoke (push) Canceled after 0s
GitHub accounts suspended; all first-party distribution now served from
git.881218.xyz/rogue/NexusGate (Gitea):
- raw:  /rogue/NexusGate/raw/branch/<branch>/<path>
- release assets and source archives under the same repo path
- scripts gain a GIT_BASE variable built from NG_REPO (default
  rogue/NexusGate); NG_REPO/NG_BRANCH/--repo/--branch semantics unchanged
- panel enrollment/uninstall commands in public/app.js point at Gitea raw
- install.sh/nexusgate.sh/agent-singbox.sh stats source previously
  defaulted to the upstream repo (a2899882); defaults now this repo
Upstream dependency references (sagernet/sing-box Go module) untouched.
2026-10-20 11:05:55 +00:00
aaaamoooo 3951134940 feat: Go port of the panel in panel-go/ — drop-in replacement for server.js
CI / test (push) Canceled after 0s
CI / anytls-smoke (push) Canceled after 0s
Pure-stdlib Go implementation of the whole control plane: same
nexusgate.json schema (unknown fields preserved verbatim, explicit
null/false tri-states modeled), same HTTP API and error strings,
embedded frontend (NG_PUBLIC_DIR override), self-implemented scrypt
auth, X25519 Reality keys, panel-hosted keyStore and heartbeat
reconciliation included. Version stays 0.6.8.

Verified: Go tests 33/33 (scrypt + Reality vectors generated from
the Node implementation, subscription goldens byte-identical),
Node suite 52/52 untouched, differential E2E against the Node
panel 50/50 including two-way DB swap. See panel-go/PARITY.md
and panel-go/INSTALL-GO.md.
2026-10-20 08:21:54 +00:00
aaaamoooo abb1a4344b feat: heartbeat reconciliation — panel re-dispatches resources a node lost
Agents (Go + Node) now report the resource IDs they actually hold in
each heartbeat. When an expected resource is missing locally (e.g. the
node's /etc/nexusgate state was wiped and only the agent restarted, so
no re-enrollment happens), the panel re-queues applies for just the
affected nodes via reconcileFromHeartbeat: gated on no queued/running
jobs for the server (in-flight jobs are never failed by this path) and
throttled to one trigger per server per 120s, audited as
system:heartbeat. reconcileServer gains optional onlyNodeIds /
failInFlight parameters; the enrollment call is unchanged. Heartbeats
without a resources array (old agents) behave exactly as before.
2026-10-20 07:46:33 +00:00
aaaamoooo f2b7d8e181 feat(agent-go): consume panel-hosted Reality keys (persist keyMaterial, backfill unused-provided keys) 2026-10-20 07:20:59 +00:00
aaaamoooo 483b891306 feat: panel-hosted Reality keys (keyStore, payload keyMaterial, backfill, cleanup) 2026-10-20 07:20:42 +00:00
aaaamoooo 1b77c610f4 fix: keep current page on refresh via hash routing (restore page from location.hash, back/forward supported) 2026-10-20 15:09:44 +08:00
aaaamoooo 495b949f18 feat: ng-agent update migrates Node agents to Go by default (NG_AGENT_IMPL=node opts out) 2026-10-20 15:05:07 +08:00
aaaamoooo 9c3789a1a4 chore(uninstall): also remove nexusgate-agent-go test unit; docs(README): Go agent memory/install notes 2026-10-20 06:56:17 +00:00
aaaamoooo d29b4f7ef1 feat(update): detect installed impl; Go path downloads release asset and replaces binary, flush-usage via binary; Node path unchanged except unit ExecStart rewrite; default REPO now aaaamoooo/NexusGate 2026-10-20 06:56:07 +00:00
aaaamoooo 545c0668ba feat(install): default to Go agent binary from release agent-v0.6.8, drop Node.js dependency; NG_AGENT_IMPL=node fallback via run.sh; shell-only enroll JSON; units ExecStart the Go binary 2026-10-20 06:55:54 +00:00
aaaamoooo ddfc27efba feat: Go agent source (stdlib-only rewrite of agent.js) + parity/install docs; binaries ship as release assets 2026-10-20 06:55:29 +00:00
aaaamoooo c6615f0ab5 fix: systemd agent unit add --max-semi-space-size=4 (match run.sh); README memory numbers to measured values 2026-10-20 06:25:37 +00:00
aaaamoooo ae9e607527 fix: agent run.sh add node memory limits (max-old-space 64) 2026-10-20 13:41:43 +08:00
aaaamoooo 5f272ed356 fix: create /usr/local/sbin before fetching agent scripts (Alpine) 2026-10-20 13:35:33 +08:00