Commit Graph
224 Commits
Author SHA1 Message Date
tsosunchia 8d36dc7406 refactor(mtr): 统一生产与测试的 atomic 哨兵初始化 2026-09-04 16:24:24 +08:00
tsosunchia fcd1336c43 refactor(trace): 将非安全随机切换到 rand/v2 2026-09-04 15:23:47 +08:00
tsosunchia 83d906bb31 refactor(runtime): 采用 Go 1.27 标准库并发与集合接口 2026-09-04 15:21:58 +08:00
tsosunchia 112932e546 refactor(mtr): 使用 typed atomic 管理并发状态 2026-09-04 15:20:19 +08:00
tsosunchia 2cab379924 test(bench): 建立 geo mtr websocket 性能与输出基线 2026-09-04 11:43:21 +08:00
tsosunchia dc7b95f479 test(trace): 收敛协议接线测试夹具
- 合并结算场景准备逻辑并保护 Result 状态初始化
- 使用真实 context channel 验证 lookup 与等待顺序
2026-08-21 19:06:12 +08:00
tsosunchia 3108b56884 test(trace): 覆盖六协议终止提交与探测匹配重试
- 覆盖 launch、两阶段 send 短路与 match worker 重试接线
- 确定性校验登记命中前后的 lookup/wait 顺序
2026-08-21 18:55:28 +08:00
tsosunchia 79e3b68334 fix(trace): 在稳定不可达响应后停止后续探测
- 在 TTL 尝试稳定后立即提交 unreachable 发送边界
- 优先匹配已登记探测,仅在登记竞态时重试
- 覆盖取消、超时、同跳 transit 优先级与六协议路径
2026-08-15 16:59:14 +08:00
tsosunchia 07b23a767b fix(trace): 省略未知的分片 MTU 数值 2026-08-14 21:34: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 a7af895acb fix(mtr): 按响应证据维护路径终点 2026-08-13 11:25:32 +08:00
tsosunchia a39fa7031f fix(trace): 按响应语义收敛 traceroute 终止边界 2026-08-13 11:25:18 +08:00
EveCat ebef637eb2 feat(trace): explain traceroute stop responses 2026-08-13 03:16:18 +08:00
EveCat 1c065129d3 fix(trace): classify probe responses before stopping
Use ICMP response semantics instead of source-address equality to detect transit, destination, and unreachable replies.

Keep tracing when any ECMP path returns a transit response, expose structured stop reasons, and preserve raw and JSON output behavior.
2026-08-12 17:11:34 +08:00
tsosunchia 7515397840 fix(mtr): 限制探测结果 hop 切片分配上限 2026-07-15 11:23:57 +08:00
tsosunchia 7862f148ab fix(mtr): 恢复 metadata 失败后的冷却重试 2026-05-25 18:02:47 +08:00
tsosunchia c0f75e2399 fix(trace): 限制 Geo 查询重试偏移 2026-05-25 16:05:20 +08:00
tsosunchia 9f75e62379 test(trace): 放宽 MTR Geo 超时断言容忍度 2026-05-25 15:54:19 +08:00
tsosunchia da9e3f7970 fix(trace): 调整 MTR 异步 Geo 超时重试 2026-05-25 08:42:30 +08:00
tsosunchia 663d1944e0 fix(trace): 调整 MTR metadata 立即重试与并发 2026-05-23 00:08:33 +08:00
tsosunchia 99276b9d67 fix(trace): 修正 DN42 异步 MTR Geo 与 PTR 的补查顺序 2026-05-22 23:09:50 +08:00
tsosunchia b2ba79f5ca Split MTR metadata lookups and tune async limits 2026-05-22 22:44:49 +08:00
tsosunchia 9d03daede9 fix(trace): 修复 MTR TCP/UDP GeoIP 补全 (#369)
Refs nxtrace/NTrace-core#369
2026-05-22 11:04:28 +08:00
tsosunchia 0b5ca7b409 fix(printer): 修正 MTR history 取样与配色 2026-05-20 22:24:21 +08:00
tsosunchia 9fc8c49162 feat(mtr): 添加可切换历史视图
- 新增 MTR probe history store 与 TUI history/chart 模式
- 增加 d/g 快捷键、OnProbe 事件和相关测试
- 更新中英文 README 并致谢 TraceBar
2026-05-20 21:56:22 +08:00
tsosunchia 1c8155a502 feat: add deploy MCP auth 2026-04-29 12:01:04 +08:00
tsosunchia a405cc0a51 Address Windows source-device review
Remove the in-body unused method assignment and extend the Windows source-device regression test across ICMP, TCP, and UDP so future method-specific gating is caught.
2026-04-20 09:36:02 +08:00
tsosunchia e66e2663f6 Restore Windows --dev source selection
Keep Windows --dev usable by resolving the selected device to a source IP and clearing SourceDevice before the tracer reaches Windows send paths. Update docs and project notes to describe that Windows routing may still choose the actual egress interface.
2026-04-20 09:06:53 +08:00
tsosunchia bf4946243f Prevent stale labels, flaky websocket tests, and speed misreports
Bound Leo IP sends and stale response delivery by timeout, bootstrap speed-mode metadata lookups without JSON banner noise, respect --speed=false pre-dispatch, validate speed source binding, cap probe response reads, avoid caching empty nali labels, treat server-only speed metadata as healthy when no client IP is available, make websocket async tests event-driven, restart Leo receive parsing reliably, close websocket receive channels exactly once, send Leo requests on the waited websocket, back off failed Geo/RDNS metadata lookups, refresh MTR API info cache timestamps after lookup, report upload response read errors, avoid launching latency probes after cancellation, and keep speed JSON tests tolerant of degraded latency samples.
2026-04-19 23:45:16 +08:00
tsosunchia 73a658b089 merge main and resolve trace geo conflict 2026-04-19 08:53:28 +08:00
tsosunchia 1d1c9e1ab1 address remaining async mtr review feedback 2026-04-19 08:48:57 +08:00
tsosunchia 9edb724581 fix review regressions in async mtr metadata 2026-04-19 01:07:57 +08:00
tsosunchia ed3fd408c6 speed up mtr startup with async metadata 2026-04-19 00:18:48 +08:00
tsosunchia 1b8a53e1b5 fix remaining speed review issues 2026-04-18 19:35:14 +08:00
tsosunchia 407ed64574 address speed mode review feedback 2026-04-18 19:11:13 +08:00
tsosunchia 78e1bd24c6 reuse main geo lookup in speed mode 2026-04-18 18:36:21 +08:00
tsosunchia 844d3c1742 Harden regression scripts and preserve WinDivert errors 2026-04-08 22:31:38 +08:00
tsosunchia 49b0144cca Fix deploy listener race and ICMP source-device gating
- let deploy mode bind the listener before printing the Web UI address and report the actual bound endpoint when :0 is used
- switch Unix and Windows regression deploy checks to parse the real base URL from deploy logs instead of preallocating a port in the script
- add Unix deploy cleanup traps and make runner scripts temporary/self-cleaning
- gate ICMP source-device propagation to Linux and macOS so unsupported Unix targets keep --dev as source-address selection only
- add server and trace regression tests for the new listener and source-device behavior
2026-04-08 21:59:21 +08:00
tsosunchia 4d5f682393 Fix Windows source-device errors and WinDivert retries 2026-04-08 21:14:43 +08:00
tsosunchia 0ddac64b7a Fix source-device normalization and deploy smoke tests 2026-04-08 20:46:33 +08:00
tsosunchia fc0277a93f darwin: avoid promiscuous pcap for TCP and UDP sniffing 2026-04-08 18:05:21 +08:00
tsosunchia 5d8918c191 Add Linux test for non-syscall packet conn binding 2026-04-07 22:11:08 +08:00
tsosunchia 7c8c03fc07 Fix source config test for Windows CI 2026-04-07 22:02:54 +08:00
tsosunchia 212254d380 Prevent unsupported binds and invalid sniff handles 2026-04-07 21:56:13 +08:00
tsosunchia 28d90ae267 Tighten regression cleanup and source device errors 2026-04-07 21:10:29 +08:00
tsosunchia 30fe4881a6 Remove Windows source-device runtime warnings 2026-04-07 19:47:50 +08:00
tsosunchia 0ca093b6aa Harden source-device handling and WinDivert regression checks 2026-04-07 18:27:09 +08:00
tsosunchia 2a5717aedf Fix explicit source/device handling across platforms
Keep the default traceroute path unchanged when neither --source nor --dev is set so existing source address selection, socket setup, and logging stay untouched.

Add a shared explicit source/device normalization helper and route the CLI traceroute path, standalone --mtu path, fast_trace, and server trace requests through it. The helper keeps --source higher priority than --dev, resolves device-derived source addresses by destination family, rejects devices without a usable address, and emits at most one runtime warning.

On macOS, bind TCP and UDP send sockets to the requested interface with IP_BOUND_IF/IPV6_BOUND_IF so explicit --dev survives utun default routes. On Linux, bind ICMP/TCP/UDP send sockets with SO_BINDTODEVICE only when a source device is explicitly configured.

On Windows, keep the existing no-rewrite constraint for real device binding. Explicit --dev now resolves a source address, clears SourceDevice before the tracer is built, and surfaces a single warning that actual egress still follows system routing.

Update CLI help text and README platform notes to document the supported --dev semantics, and add unit tests that cover no-op behavior without explicit overrides, --source priority, device family resolution, mismatch errors, and the Windows downgrade warning.
2026-04-07 17:00:53 +08:00
tsosunchia e4e6c7d270 Catch WinDivert panics in the shared Windows open path 2026-03-22 12:58:59 +08:00
tsosunchia b513155647 Handle missing WinDivert runtime gracefully on Windows 2026-03-22 12:53:04 +08:00