[Feature Request] Intercepting hardcoded localhost WebSockets for HMR (.NET Hot Reload / dotnet watch)
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 35/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- typescript
- 領域
- devtools, networking
調査の方向性
この payload では code-server のファイルやテストについて触れていません。まず、送信される localhost WebSockets に対するブラウザーコンテキストの処理と組み込みのプロキシ層を追跡し、次に、注入された aspnetcore-browser-refresh.js が一時的な ws/wss ポートをどのように使用するかを調べてください。完了時には、Hot Reload が localhost の障害なしに code-server 経由で接続する、純粋なブラウザー上の dotnet watch ワークフローになっている必要があります。
索引モデルが issue の本文から書いたものです。
説明
What is your suggestion?
Implement a client-side interceptor or dynamic proxy mechanism within code-server's browser context that can catch outbound WebSocket requests to localhost:<port> and seamlessly route them through code-server's built-in proxy layer back to the remote workspace.
Why do you want this feature?
Developers relying on code-server for a pure browser-based development experience cannot use .NET's Hot Reload (dotnet watch).
When running dotnet watch, the .NET SDK dynamically injects a script (aspnetcore-browser-refresh.js) into the DOM that attempts to establish an HMR WebSocket connection to a random, ephemeral port on localhost (e.g., ws://localhost:40777).
Because the browser executes this locally, it queries the user's physical machine rather than the remote code-server container. The connection drops, and Hot Reload fails:
Firefox can’t establish a connection to the server at ws://localhost:40777/
Firefox can’t establish a connection to the server at ws://localhost:43067/. aspnetcore-browser-refresh.js:318:25
WebSocket failed to connect. aspnetcore-browser-refresh.js:19:15
Firefox can’t establish a connection to the server at wss://localhost:33935/. aspnetcore-browser-refresh.js:318:25
WebSocket failed to connect. aspnetcore-browser-refresh.js:19:15
Unable to establish a connection to the browser refresh server. aspnetcore-browser-refresh.js:23:13
Are there any workarounds to get this functionality today?
There are no workarounds for a pure browser workflow (e.g., coding on an iPad or a locked-down laptop without CLI access).
Are you interested in submitting a PR for this?
No, I do not have the familiarity with the code-server networking/proxy codebase to implement this reliably.
- 主要言語
- TypeScript
- スター
- 79.4k
- フォーク
- 6.9k
- 平均マージ
- 2日 13時間
- マージ済み PR(30日)
- 39
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
coder/code-server のほかの issue
-
security
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
coder/code-server#8013 · コメント 3 件 ·
-
enhancement
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
coder/code-server#7962 · コメント 3 件 ·
-
bug needs-investigation
難易度 4/5 3〜5日 初心者へのやさしさ 55/100
coder/code-server#7955 · コメント 1 件 ·
-
enhancement
難易度 5/5 1週間以上 初心者へのやさしさ 42/100
coder/code-server#7948 · コメント 1 件 · リアクション 2 件 ·
-
bug code-server needs-investigation
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
coder/code-server#7938 · コメント 3 件 · リアクション 2 件 ·
coder/code-server の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
0xMiden/bridge-portal#132 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
-
area:tools bug good first issue help wanted priority:P2
難易度 2/5 1〜3時間 初心者へのやさしさ 90/100
TaewoooPark/Motifcode#14 ·
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
newrelic-experimental/preflight#793 · コメント 1 件 ·