docmirror / docmirror/dev-sidecar

播放 YouTube 视频一直加载:googlevideo 加速连接被 ECONNRESET(上游 SNI=g.cn)

Open
#704 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Bug
Dominant language
JavaScript
Stars
24.1k
Forks
3k
Avg merge
3d 3h
Merged PRs (30d)
1

Description

  • 你是否在现有 Issue列表 中搜索过相同问题,但未找到?
Ⅰ. 请说明操作系统及DS的版本号:
  1. 操作系统:Windows 10 家庭中文版(25H2 / Build 26200.9168)
  2. DS版本号:2.2.0
Ⅱ. 问题描述:

开启系统代理后,YouTube 主页、缩略图、推荐列表均正常加载,但点开任意视频后播放器一直转圈,无法出画面。Google 视频 CDN(*.googlevideo.com)的连接被 TCP 重置(ECONNRESET)。

复现视频示例:https://www.youtube.com/watch?v=cqH7NrWU_AQ

Ⅲ. 期望的结果:

视频能正常缓冲播放(和页面一样能稳定拉到字节流)。

Ⅳ. 如何复现问题?
  1. Windows 10,开启 dev-sidecar 系统代理(127.0.0.1:31180 / 31181),root CA 已安装;
  2. 用 Chrome 打开任意 YouTube 视频;
  3. 页面正常,但视频一直转圈无法播放。
Ⅴ. 相关错误日志(${user.home}/.dev-sidecar/logs/server.log):
[INFO] server - matchHostname-all: 'rr1---sn-n4v7snee.googlevideo.com' -> {".*":{"proxy":"${pre}.xn--ngstr-lra8j.com","sni":"g.cn","options":true}}
[INFO] server - ----- request url: rr1---sn-n4v7snee.xn--ngstr-lra8j.com, use alive ip from dns 'cf-DoT': 173.194.12.166
[ERROR] server - 代理请求错误: POST → https://rr1---sn-n4v7snee.xn--ngstr-lra8j.com:443/videoplayback?expire=1788571707&ip=222.90.9.199&...
    code: 'ECONNRESET'
[ERROR] server - Request error: POST → https://rr1---sn-n4v7snee.xn--ngstr-lra8j.com:443/videoplayback?..., error: Error: read ECONNRESET

补充观测:

  • 同一网络下 GET https://www.youtube.com/(页面)走 SNI=baidu.com → 返回 200;
  • 而视频走 SNI=g.cn → 连接被 RST;
  • 将 DNS 改为 quad9、强制 IPv4 后,解析与地址族均正常,但 ECONNRESET 依旧。
Ⅵ. running.json 关键内容:
"intercepts": {
  "^(?<pre>.*).googlevideo.com$": {
    "*": { "proxy": "${pre}.xn--ngstr-lra8j.com", "sni": "g.cn", "options": true },
    "/generate_204": { "success": true }
  },
  "*.youtube.com": { ".*": { "sni": "baidu.com" } }
},
"dns": {
  "mapping": { "*.googlevideo.com": "quad9", "*.gvt1.com": "quad9", "*.xn--ngstr-lra8j.com": "quad9" },
  "familyMapping": { "*.googlevideo.com": "4", "*.gvt1.com": "4", "*.xn--ngstr-lra8j.com": "4" }
}
疑问 / 建议
  1. 视频拦截规则写死 sni: g.cn,在本网络(对 g.cn 指向的 Google 视频 IP 连接会 RST)导致视频拉不到字节;而页面用 baidu.com 能通。能否让 googlevideo 的 SNI 可配置,或与页面一致使用 baidu.com?
  2. 或让 googlevideo 视频字节走可用的中继(redirector.xn--ngstr-lra8j.com → 202.101.48.33 实测可通),而非直连 Google 视频 IP。
  3. 是否为已知的跨地域 / 运营商差异?请给出规避方法。

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the googlevideo intercept and DNS/familyMapping entries in running.json, then reproduce the request while checking server.log for the selected proxy, SNI, address, and ECONNRESET. Compare the video request with the working YouTube page request and determine whether a configurable SNI or relay path prevents the reset; document the verified workaround or required change.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.