Skip to content

fix(asr): 百炼 WebSocket 优先走 IPv4,避开本机 IPv6 黑洞 - #1036

Merged
H-Chris233 merged 2 commits into
Open-Less:betafrom
HKLHaoBin:fix/asr-bailian-prefer-ipv4
Sep 8, 2026
Merged

fix(asr): 百炼 WebSocket 优先走 IPv4,避开本机 IPv6 黑洞#1036
H-Chris233 merged 2 commits into
Open-Less:betafrom
HKLHaoBin:fix/asr-bailian-prefer-ipv4

Conversation

@HKLHaoBin

Copy link
Copy Markdown
Contributor

摘要

Fixes #1035

Windows 双栈网上百炼实时 ASR 会先连不通的 IPv6,卡满 5 秒超时,听写进不了 Listening、不出字、历史也不落。本 PR 只改百炼 WebSocket 建连:解析后优先走 IPv4。

修复 / 新增 / 改进

  • openless-core 百炼客户端不再直接 connect_async;先 lookup_host,IPv4 排前,单地址 TCP 上限 1.5s,再 client_async_tls
  • 增加 order_connect_addrs_puts_ipv4_first 单测。

兼容

测试计划

  • 命令:cargo test --manifest-path openless-all/app/crates/openless-core/Cargo.toml order_connect_addrs_puts_ipv4_first
    • 结果:通过。
  • 命令:fork 上 CI workflow_dispatch(run 34102029861)
    • 结果:success(Android / Linux / macOS / Windows)。
  • 命令:fork 上 Release Tauri (cross-platform) workflow_dispatch(run 34102034124)
    • 结果:success(Windows x64、macOS arm64、macOS x64;Homebrew cask skipped)。
  • 真机:优先 IPv4 后握手约 347ms,Bailian ASR connected,转写并粘贴成功。

证据路径:

Made with Cursor

HKLHaoBin and others added 2 commits September 7, 2026 16:42
dashscope 的 AAAA 在部分 Windows 双栈网上 TCP 443 会挂死,connect_async 先试 IPv6 会卡满 5 秒超时,听写进不了 Listening。

Co-authored-by: Cursor <cursoragent@cursor.com>
@H-Chris233 H-Chris233 self-assigned this Sep 7, 2026
@H-Chris233
H-Chris233 merged commit af9eaa3 into Open-Less:beta Sep 8, 2026
4 checks passed
H-Chris233 added a commit that referenced this pull request Sep 8, 2026
#1023)

* feat(llm): add OpenCode Zen polish provider, default deepseek-v4-flash

Dictation polish uses OpenAI-compatible chat/completions. For OpenCode Go, change the Base URL to /zen/go/v1.

* fix(macos): 避免 Fn 长按与功能键误触发听写 (#1008)

Auto 和 Toggle 模式只在 Fn 短按松开且未叠加功能层操作时触发听写;长按及亮度、音量等 systemDefined 事件留给 macOS。

保留显式 Hold 模式的按住说话语义,并跳过 Fn 短按释放后的冗余仲裁延迟。

Co-authored-by: Chris233 <h-chris233@outlook.com>

* fix(asr): 百炼 WebSocket 优先走 IPv4,避开本机 IPv6 黑洞 (#1036)

* fix(asr): 百炼 WebSocket 优先走 IPv4,避开本机 IPv6 黑洞

dashscope 的 AAAA 在部分 Windows 双栈网上 TCP 443 会挂死,connect_async 先试 IPv6 会卡满 5 秒超时,听写进不了 Listening。

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(asr): preserve websocket ports and retry handshake addresses

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Chris233 <h-chris233@outlook.com>

* fix(updater): Beta 构建默认跟随 Beta 渠道 (#1041)

* fix(updater): default beta builds to beta channel (#1034)

* fix(updater): persist channel switches atomically

* feat(llm): 支持渠道级 Chat Completions、Responses 和 Messages (#1042)

* feat(llm): add channel request formats and compatibility presets

* fix(llm): harden channel protocol handling

* feat(llm): integrate OpenCode Zen with shared request formats

---------

Co-authored-by: Mark <shawninjuly@gmail.com>
Co-authored-by: Chris233 <h-chris233@outlook.com>
Co-authored-by: 浩彬(^-^) <146098469+HKLHaoBin@users.noreply.github.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
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.

[asr] Windows 双栈网上百炼听写因 IPv6 黑洞建连超时不出字

2 participants