[Feature Request] Intercepting hardcoded localhost WebSockets for HMR (.NET Hot Reload / dotnet watch)
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 35/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- typescript
- Ambito
- devtools, networking
Direzione di ricerca
Il payload non nomina file o test di code-server. Inizia tracciando la gestione del contesto del browser per i WebSocket localhost in uscita e il livello proxy integrato, quindi esamina come l'aspnetcore-browser-refresh.js iniettato utilizza porte ws/wss effimere. Il risultato dovrebbe essere un workflow dotnet watch completamente nel browser, in cui Hot Reload si connette tramite code-server senza errori localhost.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- TypeScript
- Stelle
- 79.4k
- Fork
- 6.9k
- Merge medio
- 2g 13h
- PR unite (30g)
- 39
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di coder/code-server
-
Bump proxy-addr to 2.0.8 Apertasecurity
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
coder/code-server#8013 · 3 commenti ·
-
enhancement
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
coder/code-server#7962 · 3 commenti ·
-
bug needs-investigation
Difficoltà 4/5 3-5 giorni Idoneità per principianti 55/100
coder/code-server#7955 · 1 commento ·
-
enhancement
Difficoltà 5/5 Più di una settimana Idoneità per principianti 42/100
coder/code-server#7948 · 1 commento · 2 reazioni ·
-
bug code-server needs-investigation
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
coder/code-server#7938 · 3 commenti · 2 reazioni ·
Tutte le issue di coder/code-server
Issue simili
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 95/100
-
Ecosystem: ClawMetry — the Qwen Code reader is now free and open source (follow-up to #9294 / #9338) Apertacategory/integration priority/P3 scope/documentation status/ready-for-human type/feature-request
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 84/100
-
area:auth FE mvp P3
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
klasolsson81/jobbliggaren#1788 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
get-convex/migrations#69 ·
-
accessibility angular bug good first issue typescript ux
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
apache/fineract-backoffice-ui#584 · 1 commento ·