JDT.LS binary download does not honour VS Code http.proxy setting in corporate networks
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 55/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 冷清
- 技术栈
- typescript, vscode
- 领域
- devtools, networking
调研方向
从 src/extension.ts 和下载工具开始,然后确定哪个 HTTP 客户端负责处理 JDT.LS 下载,以及其 agent 配置是如何传递的。检查 issue 中描述的 VS Code http 设置以及 HTTPS_PROXY/HTTP_PROXY 输入。完成的标准是:下载(包括更新)能够通过经过身份验证的代理工作,且不会出现报告的静默超时。
由索引模型根据 Issue 内容生成。
描述
Problem
On first install (or when the extension downloads a JDT.LS update), the download fails silently in corporate environments that require an authenticated HTTPS proxy. VS Code exposes the proxy via http.proxy and http.proxyAuthorization settings, and also via HTTPS_PROXY / HTTP_PROXY environment variables injected into the extension host. However, the extension's download logic (in src/extension.ts and the download utility) does not read these and passes no proxy configuration to its HTTP client.
Steps to Reproduce
- In a corporate environment, set:
"http.proxy": "http://proxy.corp.example.com:8080", "http.proxyStrictSSL": false - Install the extension on a machine that has no prior JDT.LS installation.
- Open a Java file. The status bar shows "Downloading Java support..." indefinitely.
- No error appears; the Output → Java channel shows a TCP timeout to
download.jboss.orgor the GitHub releases CDN.
Expected Behaviour
The extension should detect the proxy from vscode.workspace.getConfiguration('http').get('proxy') or process.env.HTTPS_PROXY and configure its HTTP download agent accordingly (e.g., via https-proxy-agent or equivalent).
Workaround (not acceptable)
Users currently have to pre-download JDT.LS manually, which is not discoverable and breaks on updates.
Proposed Fix
import HttpsProxyAgent from 'https-proxy-agent';
const proxyUrl = vscode.workspace.getConfiguration('http').get<string>('proxy')
?? process.env.HTTPS_PROXY ?? process.env.HTTP_PROXY;
const agent = proxyUrl ? new HttpsProxyAgent(proxyUrl) : undefined;
// Pass agent to node-fetch / got / axios download client
Environment
- OS: Windows 11 Enterprise 10.0.26200 (mandatory corporate proxy, no direct internet)
- VS Code: 1.89+
- Extension: redhat.java latest
- 主要语言
- TypeScript
- 星标
- 2.3k
- 派生
- 547
- 平均合并
- 20 小时 1 分钟
- 30 天内合并 PR
- 11
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
redhat-developer/vscode-java 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 68/100
redhat-developer/vscode-java#4426 ·
-
bug
难度 4/5 3-5 天 新手友好度 45/100
redhat-developer/vscode-java#4506 · 3 条评论 · 4 个 reaction ·
-
bug
难度 4/5 3-5 天 新手友好度 45/100
redhat-developer/vscode-java#4505 · 2 条评论 · 1 个 reaction ·
-
难度 4/5 3-5 天 新手友好度 52/100
redhat-developer/vscode-java#4504 · 3 条评论 · 1 个 reaction ·
-
bug
难度 3/5 1-2 天 新手友好度 62/100
redhat-developer/vscode-java#4502 ·
查看 redhat-developer/vscode-java 的全部 Issue
相似的 Issue
-
Type/Bug
难度 2/5 1-3 小时 新手友好度 78/100
OpenNSW/nsw-srilanka#497 ·
-
难度 2/5 1-3 小时 新手友好度 72/100
0xMiden/bridge-portal#132 ·
-
react-doctor severity:warning tech-debt
难度 1/5 1 小时以内 新手友好度 88/100
digidem/comapeo-cloud-app#403 ·
-
难度 2/5 1-3 小时 新手友好度 72/100
-
难度 2/5 1-3 小时 新手友好度 78/100