CommandCodeAI / CommandCodeAI/command-code
WebSocket connections fail behind Fence sandbox (ignore HTTPS_PROXY)
Nessuno ha ancora preso questa issue.
- Lingua principale
- Nessun dato sulla lingua
- Stelle
- 4k
- Fork
- 350
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
Summary
When running Command Code inside popular sandbox tool Fence (https://github.com/fencesandbox/fence) (Linux sandbox using bwrap --unshare-net), all WebSocket connections time out. Fence routes network traffic through an HTTP proxy (HTTPS_PROXY=http://127.0.0.1:3128) since direct TCP is blocked by the network namespace.
curl, fetch, and HTTP requests work correctly. However, new WebSocket(url) (used in buildSandboxStreamUrl / defaultCreateSandboxStreamSocket) ignores proxy env vars and attempts a direct TCP connection, which is blocked by the sandbox.
The codebase already has detectProxyFromEnv(). Maybe use ws package with https-proxy-agent for WebSocket connections when a proxy is detected, instead of the built-in WebSocket
Expected Behavior
CommandCode working inside Fence sandboxing
Actual Behavior
Connection issues with Fence. Can't use CommandCode with it.
Steps to reproduce the issue
- Install and configure Fence ( https://github.com/fencesandbox/fence )
- Run CommandCode with "fence cmd"
Command Code Version
1.10.0
Operating System
Linux
Terminal/IDE
JetBrains-JediTerm
Shell
bwrap
Session file (optional)
No response
Fix prompt (optional)
No response
Additional context
No response
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
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.
Direzione di ricerca
Inizia tracciando buildSandboxStreamUrl e defaultCreateSandboxStreamSocket, quindi esamina come viene utilizzato detectProxyFromEnv per le richieste HTTP esistenti. Riproduci il fallimento della sandbox Fence e verifica che le connessioni WebSocket abbiano successo tramite l’HTTPS_PROXY configurato senza compromettere le connessioni dirette.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Ambito
- cli, networking
- Tipo di issue
- Bug
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Tranquilla
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 68/100