22 Commits
Author SHA1 Message Date
tsosunchia d7a68e57c1 fix(deploy): 在初始化前限制 MCP 与 Web 探测参数 2026-09-05 20:17:50 +08:00
tsosunchia 825ca99f88 test(fuzz): 覆盖核心协议与输入解析器 2026-09-05 12:17:28 +08:00
tsosunchia 9ba52ea12d fix(server): 隔离 WebSocket trace worker panic
- 在 trace worker 边界将 panic 转为单次 1011 会话终止
- 补充确定性回归测试并修正文档中的 Gorilla 写入归属
2026-09-05 08:19:09 +08:00
tsosunchia 6aa983f25f refactor(server): 统一 deploy WebSocket 会话生命周期 2026-09-05 07:25:02 +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 bf8475df71 fix(output): 跨 Trace 入口透传终止原因 2026-08-13 11:25:52 +08:00
tsosunchia 1cda0e53bb Fix context propagation and FastIP cache synchronization 2026-03-19 15:58:35 +08:00
tsosunchia 7b8e68710c Fix cancellation handling across DNS, trace, and ws flows 2026-03-19 12:22:02 +08:00
tsosunchia d05329276b Fix CLI, MTU, logging, and websocket regressions 2026-03-19 11:08:20 +08:00
tsosunchia 8806c3b24f fix: close stale ws client loops and clear init deadline 2026-03-16 21:43:06 +08:00
tsosunchia fe8f1aea75 feat: refactor flag registration functions and enhance trace map URL handling 2026-03-13 20:49:38 +08:00
tsosunchia 27a84fa5b5 feat: add environment variable documentation and implement CORS middleware for browser access 2026-03-08 08:17:13 +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 efb437fbac fix: improve error handling and logging across multiple packages
- Enhanced error handling in `mtr_ui.go` to log warnings when raw mode cannot be enabled.
- Updated `geofeed.go` to return a more informative error instead of panicking when geofeed data cannot be loaded.
- Refined error handling in `ptr.go` to return an error if `ptrPath` is not configured.
- Improved error handling in `fast_trace.go` for network interface address retrieval.
- Added error checks in `chunzhen.go` and `ipapicom.go` for HTTP request creation and response reading.
- Enhanced error handling in `ipdbone.go` to return descriptive errors for authentication failures.
- Updated `ipfilter.go` to ensure proper IP parsing before filtering.
- Improved error handling in `ipinfoLocal.go` for database access and record parsing.
- Enhanced error handling in `ipsb.go` for HTTP request creation and response reading.
- Added checks for closed channels in `leo.go` to prevent panics.
- Improved panic recovery in `ws_handler.go` to log errors in the write loop.
- Added read deadline to WebSocket connections in `ws_handler.go` to prevent blocking.
- Enhanced configuration checks in `globalping.go` to avoid nil pointer dereferences.
- Improved error logging in `icmp_ipv4.go` and `icmp_ipv6.go` for send errors.
- Enhanced error handling in `icmp_darwin.go`, `icmp_unix.go`, and `icmp_windows.go` for checksum setting.
- Improved error handling in TCP and UDP implementations across various platforms for checksum settings.
- Enhanced error handling in `tracemap.go` for proxy configuration.
- Improved type assertions in `util.go` for DNS cache lookups.
2026-03-02 00:14:49 +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 ad3ecbd401 fix: 统一处理 context.Canceled 错误检查,确保一致性
feat(ipgeo): 在 API 请求中添加 defer 关闭响应体
fix: 修复 MTR 模式中错误处理逻辑,确保资源正确释放
test: 更新测试用例以验证 context.Canceled 错误处理
refactor: 优化 mplsSet 初始化逻辑
test: 修改测试断言为 require,增强错误处理
2026-03-01 19:24:20 +08:00
tsosunchia df19f6b58a fix: CWE-117 2026-02-28 13:38:12 +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 fc1c580ad7 Refactor ws_handler.go to improve session handling and snapshot logic 2025-10-29 11:16:42 +08:00
tsosunchia d46731fb49 mtr 模式 2025-10-20 20:48:18 +08:00
tsosunchia 46dd4a11f1 流式传输 2025-10-20 17:16:08 +08:00