redhat-developer / redhat-developer/vscode-java

JDT.LS binary download does not honour VS Code http.proxy setting in corporate networks

オープン
#4,452 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

主要言語
TypeScript
スター
2.3k
フォーク
546
平均マージ
20時間 1分
マージ済み PR(30日)
11

説明

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

  1. In a corporate environment, set:
    "http.proxy": "http://proxy.corp.example.com:8080",
    "http.proxyStrictSSL": false
    
  2. Install the extension on a machine that has no prior JDT.LS installation.
  3. Open a Java file. The status bar shows "Downloading Java support..." indefinitely.
  4. No error appears; the Output → Java channel shows a TCP timeout to download.jboss.org or 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

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

src/extension.ts とダウンロードユーティリティから始め、どの HTTP クライアントが JDT.LS のダウンロードを処理しているか、またその agent 設定がどのように渡されるかを特定します。Issue に記載されている VS Code の http 設定と HTTPS_PROXY/HTTP_PROXY の入力を確認します。更新を含むダウンロードが認証済みプロキシ経由で、報告されているサイレントタイムアウトなしに動作すれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
typescript, vscode
領域
devtools, networking
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
静か
明瞭さ
おおむね明確
初心者へのやさしさ
55/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。