[Feature Request] Intercepting hardcoded localhost WebSockets for HMR (.NET Hot Reload / dotnet watch)
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Anfängerfreundlichkeit
- 35/100
- Issue-Typ
- Feature
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Aktiv
- Tech-Stack
- typescript
- Bereich
- devtools, networking
Rechercherichtung
Der Payload nennt keine code-server-Dateien oder Tests. Beginne damit, die Handhabung des Browser-Kontexts für ausgehende localhost-WebSockets und die integrierte Proxy-Schicht nachzuverfolgen, und untersuche anschließend, wie das injizierte aspnetcore-browser-refresh.js kurzlebige ws/wss-Ports verwendet. Das Ergebnis sollte ein reiner Browser-dotnet watch-Workflow sein, bei dem Hot Reload über code-server ohne localhost-Fehler eine Verbindung herstellt.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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.
- Vorherrschende Sprache
- TypeScript
- Sterne
- 79.4k
- Forks
- 6.9k
- Ø Merge
- 2 T. 13 Std.
- Gemergte PRs (30 T.)
- 39
Beitragsleitfaden
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus coder/code-server
-
Bump proxy-addr to 2.0.8 Offensecurity
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 74/100
coder/code-server#8013 · 3 Kommentare ·
-
enhancement
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 35/100
coder/code-server#7962 · 3 Kommentare ·
-
bug needs-investigation
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 55/100
coder/code-server#7955 · 1 Kommentar ·
-
enhancement
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 42/100
coder/code-server#7948 · 1 Kommentar · 2 Reaktionen ·
-
bug code-server needs-investigation
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 48/100
coder/code-server#7938 · 3 Kommentare · 2 Reaktionen ·
Alle Issues in coder/code-server
Ähnliche Issues
-
Type/Bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
OpenNSW/nsw-srilanka#497 ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
0xMiden/bridge-portal#132 ·
-
react-doctor severity:warning tech-debt
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 88/100
digidem/comapeo-cloud-app#403 ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100