mirror of
https://github.com/nxtrace/NTrace-core.git
synced 2026-12-03 09:36:11 +00:00
- 为 stdin reader 使用 per-request response,避免并发调用串线 - 统一 Fast Trace IPv4/IPv6 非取消错误处理,移除 log.Fatal 分支 - 加固 deploy auth cookie 与 MCP session 测试 helper - 显式断言 MTR MCP capability 工具存在
1.1 KiB
1.1 KiB
Validation
Startup
Loopback tokenless default:
nexttrace --deploy --mcp
External authenticated:
nexttrace --deploy --mcp --listen 0.0.0.0:1080 --deploy-token "$TOKEN"
Expected:
- stdout prints the Web console listen URL.
- stdout prints the MCP endpoint when
--mcpis enabled. - external listen without manual token prints a generated token.
- manual token does not echo the token.
Auth Smoke Checks
curl -i http://127.0.0.1:1080/api/options
curl -i -H "Authorization: Bearer $TOKEN" http://127.0.0.1:1080/api/options
curl -i -H "X-NextTrace-Token: $TOKEN" http://127.0.0.1:1080/api/options
Do not use query token URLs.
MCP Smoke Checks
Use an MCP client pointed at:
http://127.0.0.1:1080/mcp
Then call:
nexttrace_capabilitiesnexttrace_traceroutewith{"target":"example.com","protocol":"icmp"}nexttrace_globalping_limitsnexttrace_globalping_tracewith a smalllocations[]set
Repo Tests
go build ./...
go test ./...
node --test server/web/assets/*.test.cjs