記事一覧に戻る
ハウツーBilibiliCDNBrowser Extension

一个神秘设置解决 Bilibili 视频卡顿

海外看 B 站卡顿,换 DNS、挂 VPN 都是碰运气,真正的原因是 B 站给你分配了慢的 CDN 节点。装一个扩展把视频固定在最快的节点,顺便附上 Android 和电视的做法。

更新日 2 min30 回表示記事の言語

你们看B站视频也卡成狗吗?

懒人解法:浏览器装扩展

懒得看原理,省流: 浏览器装这个 (如果有篡改猴/油猴的同功能脚本记得先移除)

装前装后对比

Before

扩展关闭时:视频走 B 站分配的 Akamai 节点(cdn=…akamaized.net),下载速度 66 kB/s

After

扩展开启后:同一个视频改走 08ct 节点,1080P+ 下载速度 3.3 MB/s

如果你还想继续看

为什么换 DNS、挂 VPN 不一定有用

在海外看 bilibili 视频卡顿,网上搜常出现 VPN 啦,改 DNS 8.8.8.8 之类的,这些都不一定管用

因为真正的原因是B站给你分配了「慢速的 CDN 节点」。上面这些方法本质都是「提高拿到好节点的概率」,不能根治。所以跟玄学一样,有些人有用有些人没用

如果想了解 CDN 是什么,可以看我这篇技术博客文章:如何真正彻底解决 Bilibili 卡顿(繁体中文)

真正的解法:固定最快的节点

真要彻底解决,你必须知道所在地区最好的节点,然后固定它

为此我做了这个插件,如果你平时用电脑浏览器看,装上面的扩展,强制视频走最快的节点

手机和电视怎么办

如果用 Android 看,不要用官方 APP,改用 PiliNara 这个第三方 apk (好用很多没广告)
https://github.com/Starfallan/PiliNara/releases

如果用机顶盒或智能电视,别用那什么云xx小电视(真的拉完了),用 blbl APP
https://github.com/roge4444/blblRogerMod/releases

原理都是一样的,这些 APP 内置测速并固定 CDN 的功能


写在最后

以上是我踩坑三年多来的真心分享,不是广告

浏览器扩展是我自己做来给自己用的,永久免费。希望帮到有需要的人,有想要的功能或 bug 反馈也可以留言或私信

如果你装上后觉得不错,不妨顺手留个五星鼓励。或者到以下 Github 项目点个星星
https://github.com/a0972199950/bilibili-cdn-switcher?utm_source=lazy_cv&utm_medium=referral&utm_campaign=secret_setting_article&utm_content=zhcn

コメント(0)

まだコメントはありません。最初のコメントを書いてみませんか?

関連記事

The same 4K video before and after the extension: buffering at 9 KB/s before, 8.8 MB/s after
技術記事11 min

How to Actually Fix Bilibili Buffering for Good

Why popular Bilibili videos play fine overseas while unpopular ones stall: CDN caching and trips back to origin, why the narrowest link sets your speed, why DNS and VPN tricks are hit or miss, and how my extension picks a default node from real tests across 14 Taiwanese ISPs.

繁體中文 / English

速度テスト実行中の CDNSpeedTest 画面
ハウツー7 min

Bilibili CDN 速度テスト — 参加ガイド

画像付きガイド:CDNSpeedTest.exe をダウンロードし、ネットワークチェック後に QR コードでログイン、テスト結果を送信して各国で最速の Bilibili サーバーを探します。

繁體中文 / 简体中文 / English / 日本語 / 한국어

Notice on top of the Bilibili player saying the CDN was slow and playback switched to a backup node
技術記事14 min

Detecting CDN Failures in a Bilibili Extension and Falling Back to Backup Nodes

How the extension decides a CDN node is really broken: which errors to ignore, how to detect stalls from currentTime and the forward buffer, why it switches once quietly before asking you, and how it avoids bouncing between nodes. Also covers live streams.

繁體中文 / English

Cover: the Network panel domain changes from upos-hz-mirrorakam.akamaized.net to upos-sz-mirror08ct.bilivideo.com, above the four hook points: __playinfo__, the playurl API, .m4s segments and live streams
技術記事13 min

Rewriting Bilibili's Stream CDN on the Fly from a Chrome Extension's MAIN World

Bilibili's stream URLs arrive through SSR __playinfo__, the playurl API, segment requests and the live API. Using bilibili-cdn-switcher's code, this walks through hooking each path, what gets rewritten, and the traps: one-shot Response bodies, read-only XHR responseText, and speed tests that must bypass your own hooks.

繁體中文 / English

Cover: more testers, better defaults. A loop of four steps: test at home, get custom nodes, report back, update the default list (cdn-list.json), then back to users in the next release
技術記事23 min

How Crowdsourced Speed Tests Keep Improving Bilibili CDN Server Picks

How a Windows speed test app benchmarks 299 Bilibili nodes in people's homes, picks the 10 most stable with layered videos and a three-stage funnel, writes them into the extension on the spot, and sends reports back so each country's default nodes improve by market-share-weighted coverage and missing ISPs get recruited.

繁體中文 / English

Cover: one src/ folder goes through build.mjs into Chrome, Edge and Firefox zips (Chrome and Edge share one sha256), while Safari goes through an Xcode project to the App Store
技術記事19 min

Shipping a Bilibili Extension from One Codebase to Chrome, Edge, Firefox and Safari

How one src/ becomes four store builds, why the zips must be reproducible (with real sha256 runs and a line-ending gotcha), 5-language release notes guarded by a pre-push hook, and which release steps are scripted versus always done by hand.

繁體中文 / English

Cover: one page, two JS worlds. typeof chrome.storage is undefined in the MAIN world console and object in the ISOLATED world; both share the DOM and localStorage and talk via postMessage
技術記事14 min

Chrome Extensions: The Basics of MAIN World and ISOLATED World

Patched window.fetch in a content script and the page ignored you? What the MAIN and ISOLATED worlds can each see, the three ways to pick a world, when to split into two scripts, how they talk through localStorage and postMessage, and which forged messages to reject.

繁體中文 / English