Commit Graph
172 Commits
Author SHA1 Message Date
tsosunchia 10ac255a2b docs(api): 明确 provider 输入与规范回显
- CLI help 使用 selector 实际接受的 ipdb.one 与 chunzhen 值\n- MCP skill 限定 NextTrace-API 规范回显适用于官方 API 及旧别名
2026-08-14 19:58:51 +08:00
tsosunchia 9465829d0b fix(api): 修复帮助文案与测试环境隔离
- 明确 MTR API 信息仅在元数据可用时显示,并补全 IPDB.One\n- 修正 data provider 帮助文本拼写及双语快照\n- 隔离 WebSocket 兼容测试中的环境 provider 全局值
2026-08-14 19:49:32 +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
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 09b9ff5f14 feat(dns): 组合 q 公共子包提供 DNS 客户端
- 仅在 full flavor 注册 -l/--dns 独占终端模式
- 锁定 q v0.19.12 并加入差分、fatal 与 flavor 隔离门禁
- 记录架构、体积、许可证、升级协议与已知风险
2026-07-27 16:35:43 +08:00
tsosunchia 9c73c9d983 fix(fast-trace): 修正 runtime prepared 判定 2026-06-10 16:39:48 +08:00
tsosunchia 2a8467b0c1 fix(fast-trace): 复用 v4 token runtime 初始化 2026-06-10 16:06:33 +08:00
tsosunchia b58fa4b0f6 fix(api-v4): 保留预热失败与代理场景的回退路径 2026-05-25 18:02:36 +08:00
tsosunchia 8b81f0365f Add FastIP-aware NextTrace API v4 HTTP path 2026-05-22 17:32:10 +08:00
tsosunchia 28050b5da6 fix(cmd): 让 -x 隐藏输入支持 Ctrl-C 中断
- 用专用隐藏输入 reader 处理 Ctrl-C/Ctrl-D/退格
- 中断时返回 130 并恢复终端状态
2026-05-22 11:16:55 +08:00
tsosunchia 564d97b2c2 feat(util): 用临时文件保存 session v4 token
- 将 -x 从父进程 env 写入脚本调整为 session token 文件
- 启动时从 session token 文件加载 NEXTTRACE_API_V4_TOKEN
2026-05-22 11:16:54 +08:00
tsosunchia 489e31bacf fix(cmd): 允许 -x 直接读取 NextTrace API v4 token
- 在 setup 流程中从 stdin/TTY 读取 token
- 保持 stdout/stderr 分离并避免回显 token
2026-05-22 11:16:54 +08:00
tsosunchia f619e7b660 refactor(api): 统一 NextTrace API v4 命名
- 将抽象 API v4 文件和符号改为 NextTrace API v4
- 同步 CLI flag、文档和测试命名
2026-05-22 11:16:54 +08:00
tsosunchia 7ce9cb74e6 feat(cmd): 输出 session-only v4 token setup 脚本
- 为 -x 生成 eval/iex 可执行的当前 shell token 设置脚本
- stdout 为终端时避免直接打印 token-bearing 语句
2026-05-22 11:16:54 +08:00
tsosunchia 97bcf79f8d feat(ipgeo): 添加 NextTrace API v4 HTTP GeoIP provider
- 仅在 NEXTTRACE_API_V4_TOKEN 存在时接管 LeoMoeAPI
- 保留未配置 v4 token 时的 v3 WebSocket 默认路径
2026-05-22 11:16:54 +08:00
tsosunchia d678ac8f12 fix(mcp): 完善 deadline 取消处理
- 将 wshandle 日志抑制 helper 扩展到 DeadlineExceeded 和已结束 base context
- 让 lookupTargetIPOrExit 对 DeadlineExceeded 返回正常停止
- 补充 cmd 与 wshandle 的 deadline 取消测试
2026-05-01 08:34:58 +08:00
tsosunchia fc0d9af40f fix(nexttrace): stop cancel-triggered retry loops 2026-04-30 14:49:22 +08:00
tsosunchia 78760ef852 fix(deploy): print routable MCP endpoint
- 优先使用 listen access 地址打印 MCP Endpoint

- 避免 wildcard 监听时输出 0.0.0.0/:: 作为客户端地址
2026-04-29 14:01:53 +08:00
tsosunchia 1c8155a502 feat: add deploy MCP auth 2026-04-29 12:01:04 +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 c411cf5604 fix(nali): treat cancellation as a clean exit 2026-04-19 17:20:20 +08:00
tsosunchia 56ce6fa09f fix(nali): enforce token boundaries and cache eviction 2026-04-19 17:09:00 +08:00
tsosunchia 8e0d9180e1 fix(nali): bound cache and normalize annotation output 2026-04-19 16:48:41 +08:00
tsosunchia c8bf784f14 feat(nali): add full-build IP annotation mode 2026-04-19 10:19:06 +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 756508006d add nexttrace speed mode 2026-04-18 18:23:49 +08:00
tsosunchia d40677a186 Fix Windows MTU source-device handling 2026-04-08 22:51:36 +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 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 b513155647 Handle missing WinDivert runtime gracefully on Windows 2026-03-22 12:53:04 +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 21396148d0 fix: improve Windows mtu handling and privilege prompts 2026-03-19 00:14:08 +08:00
tsosunchia e060c33777 feat: Enhance traceroute output handling and add tests
- Added support for output path and default output flag in traceroute commands.
- Implemented output path resolution logic with conflict checks.
- Updated globalping and MTR modes to handle new output options.
- Enhanced MTU mode with styled output and improved result printing.
- Refactored table printer to support clear screen option and added tests for table output.
- Introduced new logging functions in tracelog for better file handling and real-time output.
- Added comprehensive tests for new features and existing functionalities.
2026-03-18 22:49:22 +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 6eec12e78c fix: accept negative psize CLI values 2026-03-17 21:44:41 +08:00
tsosunchia d9dbcc2a38 feat: align psize semantics and add tos 2026-03-17 16:41:10 +08:00
tsosunchia f6816f9592 feat: add standalone mtu mode metadata and flavor gating 2026-03-17 11:33:36 +08:00
tsosunchia 4d967ba7aa feat: add standalone mtu trace mode 2026-03-16 23:10:06 +08:00
tsosunchia 8806c3b24f fix: close stale ws client loops and clear init deadline 2026-03-16 21:43:06 +08:00
tsosunchia 0b0c6662e8 修复 MTR 调度 goroutine 泄漏 2026-03-15 22:11:44 +08:00