Commit Graph
4 Commits
Author SHA1 Message Date
aaaamoooo d9bf21a847 agent: default sing-box stats API port 10086 -> 10089
CI / anytls-smoke (push) Waiting to run
CI / test (push) Waiting to run
Avoids the v2ray_api listen colliding with L-UI's fixed 10086 on
dual-homed nodes. NG_SINGBOX_API_PORT env still overrides. Aligns the
stats-query --server default and the doctor script fallback to the
same value. Agent version stays 0.6.8.
2026-10-23 12:33:00 +00:00
aaaamoooo 408b03ee68 feat(agent-auth): session tokens replace per-request scrypt (item 25)
Panel: after one scrypt-verified key auth, issue a random 24h
session token; store only its SHA-256 hash + expiry on the agent
record. authenticateAgent tries the token path first (constant-time
hash compare, active + unexpired), then the original fingerprint /
legacy VerifySecret path, and hands fresh tokens out via the
X-Agent-Session-Token response headers. Revoke() now clears token
material at all three revocation sites.

Agent: persist the token in the config dir (0600, temp+rename like
keys.json), present it as bearer, and on any 401 clear it and retry
once with the key (which re-issues). Old panels never send the
headers, so key-only operation is unchanged; old agents ignore the
headers. Version stays 0.6.8.

Tests: panel — issuance, hash-only storage, scrypt-free token path
(sabotaged KeyHash still authenticates), expiry fallback + rotation,
hash-mismatch fallback, revocation, per-record binding, key-only
rotation. Agent — capture/persist/reuse against a fake panel, 401
fallback and re-issue, old-panel key-only, client-side expiry,
double rejection surfacing without retry loops.
2026-10-21 13:12:19 +00:00
aaaamoooo bb974e2ed7 fix(agent): fall back to install record for sing-box core version (item 12)
Locally built sing-box v1.13.21 carries no version stamp and reports
'unknown', leaving the panel core-version column empty. The agent probe
now falls back to /etc/nexusgate/sing-box/version when the binary
reports no version; agent-singbox.sh writes that record (version
without the v prefix) on every successful install path, including the
already-installed early exit. Agent version stays 0.6.8.
2026-10-21 10:36:09 +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