Commit Graph
29 Commits
Author SHA1 Message Date
tsosunchia 5740bcd734 fix(web): 显示成功探测的零 RTT 延迟 2026-09-05 19:25:38 +08:00
tsosunchia ae8ba80aa2 fix(mtr): 接受零 RTT 回包并计入统计与输出 2026-09-05 19:11:26 +08:00
tsosunchia 043a667796 fix(web): 将 MTR 终止标记放在主机信息旁 2026-08-14 21:20:39 +08:00
tsosunchia df516310ec refactor(api): 统一官方 API 命名与 provider 规范值
- 将公共 data_provider 统一为 NextTrace-API,并保留旧别名输入兼容
- 按 v3/v4 语义重命名内部实现并保留 Deprecated Go 包装
- 同步 CLI、Web、MCP、文档及输出规范化测试
2026-08-14 19:37:55 +08:00
tsosunchia 20ad874194 fix(trace): 保留终止 marker 并按语义维护 MTR 边界
- 分离人类响应与机器 marker,并聚合有界 MTR 终止证据
- 保留 TUI/report 截断后的 marker,区分终端样式与文件纯文本
- 明确输出优先级并补齐 CLI、Fast、Web 回归测试与文档
2026-08-13 12:21:37 +08:00
tsosunchia bf8475df71 fix(output): 跨 Trace 入口透传终止原因 2026-08-13 11:25:52 +08:00
tsosunchia cff34d401e feat: update probe packet size handling and defaults across CLI and server 2026-03-17 22:11:13 +08:00
tsosunchia d9dbcc2a38 feat: align psize semantics and add tos 2026-03-17 16:41:10 +08:00
tsosunchia 77abf1b515 Refactor MTR signal handling and context management
- Unified signal handling in MTR CLI using `signal.NotifyContext(...)` for Ctrl-C/SIGTERM, removing the need for separate `sigCh` and goroutine.
- Updated `runMTRTUI`, `runMTRReport`, and `runMTRRaw` functions to utilize the new context management.
- Enhanced `mtrUI` to safely call `cancel()` only if it is not nil.
- Modified `IPDBOneClient` to clone HTTP clients with timeout settings, ensuring proper timeout handling without modifying global state.
- Adjusted raw aggregation keys in the frontend to collapse based on TTL, improving display of timeout/success results.
- Added context support in various tracer functions to allow cancellation and timeout handling.
- Improved error handling and test coverage for MTR operations, ensuring robustness against nil results and empty responses.
- Refined DNS resolver functions to use mutexes for thread-safe access to the geo resolver override.
2026-03-06 14:07:58 +08:00
tsosunchia f69903a00c fix(web): resolve post-v1.5.0 review findings
Address all three review findings from the v1.5.0..HEAD audit:\n- Remove Web MTR reliance on process-wide globals (SrcDev/DisableMPLS) by passing session-scoped trace.Config fields.\n- Apply dot_server consistently to Web/API Geo DNS and LeoMoe/FastIP initialization via scoped resolver setup.\n- Restore Web MTR default per-hop cadence to 1000ms and send hop_interval_ms from frontend.\n\nAlso added regression tests in server/trace_handler_test.go and util/dns_resolver_test.go, and updated CLAUDE.md.\n\nValidation passed:\n- go test ./...\n- go build ./...\n- go build -tags flavor_ntr ./...\n- go build -tags flavor_tiny ./...\n- node --check server/web/assets/app.js
2026-03-06 13:04:42 +08:00
tsosunchia 3a6ba0a99e fix(web-mtr): 修复 Per-Hop 并发下超发残影与长持锁阻塞问题
- 修复 WebSocket MTR per-hop 路径中 traceMu 长时间持锁,改为仅初始化阶段短暂加锁,避免持续探测期间阻塞其他请求
- 新增 hop_interval_ms 请求字段,保留 interval_ms 兼容,并按 hop_interval_ms -> interval_ms -> 1000ms 回退
- 前端新增 knownFinalTTL 截断逻辑:命中目标 TTL 后下调水标并清理高 TTL 过期行,拦截后续高 TTL 迟到数据
- 在 clearResult(resetState) 中重置截断水标,避免会话间状态污染
- 新增前端截断行为测试,覆盖下调、剪枝、丢弃与重置场景
- 回归通过:前端聚合测试、Go 构建与现有测试集均通过
2026-03-01 22:38:33 +08:00
tsosunchia ea15375b5b feat: 增强 MTR 原始流式模式,添加 API 信息输出和 TTL 间隔控制 2026-02-28 11:09:06 +08:00
tsosunchia d41d8b2fba feat: Introduce MTR raw streaming functionality
- Added support for streaming probe-level MTR raw events via `trace.RunMTRRaw`.
- Implemented a new `mtrRawAggregator` to handle raw MTR data aggregation.
- Updated the web client to handle `mtr_raw` messages and render statistics accordingly.
- Introduced new JavaScript module `mtr_agg.js` for aggregating MTR raw data.
- Created new printer functions for formatting MTR raw records.
- Added tests for the new MTR raw functionality to ensure correct behavior.
- Deprecated the legacy snapshot aggregator for MTR.
2026-02-28 09:41:25 +08:00
tsosunchia 0f09cddde0 Merge pull request #127 from nxtrace/alert-autofix-49
Potential fix for code scanning alert no. 49: Client-side cross-site scripting
2025-10-29 12:44:23 +08:00
tsosunchia fee8812bdc Refactor app.js to normalize error keys and prevent prototype pollution 2025-10-29 12:41:36 +08:00
tsosunchiaandCopilot d1c6be66aa Update server/web/assets/app.js
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-10-29 12:38:47 +08:00
tsosunchiaandCopilot Autofix powered by AI b2a70ac384 Potential fix for code scanning alert no. 49: Client-side cross-site scripting
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
2025-10-29 12:30:19 +08:00
tsosunchia 04af30d940 Update default destination port for UDP protocol in app.js (33494) 2025-10-29 10:53:29 +08:00
tsosunchiaandCopilot c77a025b83 Update server/web/assets/style.css
The .hidden class is defined twice (lines 368-370 and 511-513). Remove the duplicate definition to avoid confusion and potential CSS specificity issues.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-10-29 10:25:06 +08:00
tsosunchia 6496971736 修改了一些样式 2025-10-20 22:56:10 +08:00
tsosunchia 4b06ab59f4 修正了一些显示BUG 2025-10-20 22:17:57 +08:00
tsosunchia 23c45b7bbd 修改一些样式 2025-10-20 21:17:37 +08:00
tsosunchia d46731fb49 mtr 模式 2025-10-20 20:48:18 +08:00
tsosunchia d8ee027664 修改支持的最大探测次数 2025-10-20 19:04:22 +08:00
tsosunchia 2cba293651 前端增加支持设置psize和dstport 2025-10-20 18:55:15 +08:00
tsosunchia 2d73fe62fc 修改前端 2025-10-20 18:42:25 +08:00
tsosunchia 73636ee190 增加英文支持 2025-10-20 18:09:39 +08:00
tsosunchia 46dd4a11f1 流式传输 2025-10-20 17:16:08 +08:00
tsosunchia 762579e8be 增加depoly模式 2025-10-20 16:25:48 +08:00