Skip to content
All writing Part 03 of 12 · 在容器裡遙控 Chrome 的完整路由
Engineering · 2 min read

Chrome 128 鎖死遠端除錯

Chrome 128 開始靜靜忽略 --remote-debugging-address=0.0.0.0。跨 Pod 連線直接斷掉,沒有錯誤訊息。這裡解釋原因和修復方式。

那個 Breaking Change

Chrome version 128 之前,--remote-debugging-address=0.0.0.0 告訴 Chrome 接受所有 Pod 的連線。Chrome version 128 開始,這個 flag 被忽略。Chrome 永遠只聽 127.0.0.1

前置知識:localhost vs 0.0.0.0CDP

Chrome 127 及更早 --remote-debugging-address =0.0.0.0 有效 0.0.0.0 = 接所有電話 其他 Pod 能連 Chrome 128+ Flag 被忽略 永遠 127.0.0.1 127.0.0.1 = 群組聊天限定 其他 Pod 連不上

為什麼: CDP 沒有密碼。連上就能控制 Chrome。Chromium 團隊認為暴露在網路上太危險。

同 Pod vs 不同 Pod

同 Pod:能通 API localhost Chrome 共享 network namespace 不同 Pod:斷線 API Pod Chrome Pod 只聽 127.0.0.1
  • 同 Pod: API 和 Chrome 共享群組聊天。沒問題。
  • 不同 Pod: API 必須打分機。Chrome 只聽群組聊天。連線失敗。

修復方式:在 Chrome Pod 裡放一個 socat 接線員

「Chrome 有一個 flag 叫 --remote-debugging-address=0.0.0.0。從 128 版開始,它什麼都不做。」


參考來源:

Related: 接著看修復這個問題的 socat 接線員模式,或回到系列總覽

Tags #kubernetes #chrome-devtools #containers
// connect

Be brave | Be wise | Be grateful

21 BreakinCode

// elsewhere
LinkedInMedium (lang: en)Youtube
wh:~$William Hung· © 2026 Taipei · GMT+8 · Available for collaboration