Skip to content

fix: correct upload timing, web listener leak, DNS DoH contract and add IPv6 DNS - #5

Merged
AmisKwok merged 2 commits into
mainfrom
fix/diagnostics-bugfixes-1.0.5
Sep 20, 2026
Merged

AmisKwok merged 2 commits into
mainfrom
fix/diagnostics-bugfixes-1.0.5

Conversation

@AmisKwok

@AmisKwok AmisKwok commented Sep 20, 2026 •

Copy link
Copy Markdown
Member

Summary / 摘要

Fixes several diagnostics correctness and resource-leak bugs and adds IPv6 DNS resolution; ships as v1.0.5.
修复了若干诊断正确性与资源泄漏问题,并新增 IPv6 DNS 解析;以 v1.0.5 发布。

Changes / 变更

  • Fix upload speed measurement to stop the timer when the request body is fully sent, so the server response download no longer inflates upload throughput. / 修复上传速率测量:请求体发出即停表,服务器回包下载时间不再计入,上传速率与进度回调保持一致。
  • Fix Web connectivity listener leak by attaching online/offline listeners on the first subscription and detaching them on the last cancellation, so repeated subscriptions no longer accumulate global event listeners. / 修复 Web 连通性监听泄漏:首次订阅时挂载、末次取消时移除浏览器 online/offline 监听,反复订阅不再累积全局监听。
  • Fix Web DNS DoH contract: an explicit server with no known DoH endpoint now returns the documented "unsupported" result instead of probing an arbitrary https://<server>/dns-query URL. / 修复 Web DNS DoH 契约:无已知端点的显式服务器按文档返回"不支持",而非请求未必提供 DoH 的地址。
  • Fix Web ping RTT to stop the timer at the response headers, so a large response body no longer inflates the reported latency. / 修复 Web ping RTT:收到响应头即停表,响应体大小不再抬高测得的延迟。
  • Add IPv6 DNS resolution: the raw-UDP resolver now sends both A and AAAA queries and binds a wildcard socket matching the target server's address family, so IPv6 answers are resolved too. / 新增 IPv6 DNS 解析:原始 UDP 解析器同时发送 A 与 AAAA 查询,并按目标服务器地址族绑定通配套接字,从而也能解析 IPv6 地址。
  • Add a speed-test smoke test to guard the upload-timing fix against regressions. / 新增上传计时修复的冒烟测试防止回归。
  • Bump version to 1.0.5 (pubspec, iOS/macOS podspecs, README, CHANGELOG) and rebuild the GitHub Pages docs site. / 版本升至 1.0.5(含 pubspec、iOS/macOS podspec、README、CHANGELOG)并重建文档站点。
  • Harden the example app against setState after dispose and overlapping runs. / 加固示例应用:避免组件销毁后调用 setState,并防止重复运行。

Context / 背景

These bugs silently understated upload bandwidth, leaked global event listeners on the web, served an incorrect DoH fallback, and overstated web ping latency; IPv6-only DNS servers were previously unreachable. The fixes preserve the public API contract and only change lib/ runtime behavior, so they earn a CHANGELOG entry.
这些缺陷会悄悄低估上传带宽、在 Web 端泄漏全局监听、给出错误的 DoH 回退,并高估 Web ping 延迟;此前纯 IPv6 的 DNS 服务器不可达。修复未破坏公开 API,仅影响 lib/ 运行行为,因此写入变更日志。

Checklist / 检查项

  • Title follows Conventional Commits / 标题符合约定式提交
  • CI checks pass after merge / 合入后 CI 通过

Test plan

  • flutter test passes, including the new speed-test smoke test / flutter test 通过,含新增上传计时冒烟测试
  • dart format . reports no changes / dart format . 无改动
  • Merge to main and confirm the 3 required status checks (Analyze & Test, Pana Score Check, Check PR Title) pass / 合入 main 后确认三项必需检查通过

🤖 Generated with Zero Buddy

…dd IPv6 DNS

- Stop the upload timer at request-send so the server response no longer
  inflates upload throughput (speed_test_service).
- Detach browser online/offline listeners on the last connectivity
  subscription cancel to avoid leaking global listeners (connectivity_service_web).
- Return the documented 'unsupported' result for DoH-less web DNS servers
  instead of probing an arbitrary https URL (dns_service_web).
- Stop the web ping timer at response headers so large bodies do not inflate
  latency (ping_service_web).
- Resolve IPv6 (AAAA) from the raw-UDP resolver and bind a matching address
  family (dns_service_io, dns_packet).
- Guard example setState after await and disable the Run button while busy.
- Add a speed-test smoke test to prevent regressions.
@AmisKwok
AmisKwok merged commit 5f8ee9d into main Sep 20, 2026
9 checks passed
@AmisKwok
AmisKwok deleted the fix/diagnostics-bugfixes-1.0.5 branch September 20, 2026 20:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant