Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add proxy support to http2 requests in the extension host #185098

Open
chrmarti opened this issue Jun 14, 2023 · 7 comments
Open

Add proxy support to http2 requests in the extension host #185098

chrmarti opened this issue Jun 14, 2023 · 7 comments
Assignees
Labels
feature-request Request for new features or functionality proxy Issues regarding network proxies
Milestone

Comments

@chrmarti
Copy link
Collaborator

chrmarti commented Jun 14, 2023

Previously reverted: #189133

@chrmarti chrmarti added plan-item VS Code - planned item for upcoming proxy Issues regarding network proxies labels Jun 14, 2023
@chrmarti chrmarti added this to the June 2023 milestone Jun 14, 2023
@chrmarti chrmarti self-assigned this Jun 14, 2023
chrmarti added a commit to microsoft/vscode-proxy-agent that referenced this issue Jun 14, 2023
chrmarti added a commit to microsoft/vscode-proxy-agent that referenced this issue Jun 14, 2023
chrmarti added a commit to microsoft/vscode-proxy-agent that referenced this issue Jun 14, 2023
chrmarti added a commit to microsoft/vscode-proxy-agent that referenced this issue Jun 14, 2023
chrmarti added a commit to microsoft/vscode-proxy-agent that referenced this issue Jun 19, 2023
chrmarti added a commit to microsoft/vscode-proxy-agent that referenced this issue Jun 19, 2023
@chrmarti chrmarti modified the milestones: June 2023, July 2023 Jun 29, 2023
chrmarti added a commit to microsoft/vscode-proxy-agent that referenced this issue Jul 7, 2023
chrmarti added a commit to microsoft/vscode-proxy-agent that referenced this issue Jul 7, 2023
@chrmarti chrmarti modified the milestones: July 2023, On Deck Jul 27, 2023
@chrmarti
Copy link
Collaborator Author

Discussion: nodejs/help#4189

@chrmarti
Copy link
Collaborator Author

Previously reverted due to #188676 and https://github.com/github/codespaces/issues/14593.

Status on these:

@chrmarti
Copy link
Collaborator Author

chrmarti commented Sep 25, 2023

Some more findings on the change in grpc behavior:

The Codespaces extension worked around this by using 127.0.0.1 to connect to instead of localhost which avoids the problem.

When I temporarily set the socket._handle = { isStreamBase: true } to bypass the wrapping in Http2Session and clear it before calling socket.connect(), the session does not emit connect. Though this is probably not a valid fix (only tested in isolation not with the patched module).

@chrmarti
Copy link
Collaborator Author

Opened nodejs/node#49860 for Node.

@kryops
Copy link

kryops commented Oct 2, 2023

The system certificate loading V2 also seems to affect the native fetch API.

We conditionally include a polyfill to node-fetch:

import fetch, { Headers, Request, Response } from 'node-fetch';

if (!global.fetch) {
  global.fetch = fetch;
  global.Response = Response;
  global.Headers = Headers;
  global.Request = Request;
}

This stopped working in VS Code 1.82 due to the Node 18 update that made fetch globally available, but apparently without support for system certificates.

When we checked the insiders build, it was working again, but since #194408 it only works with the "Http › Experimental: System Certificates V2" configuration activated.

Does this belong here or should I open a separate issue to track system certificate support for fetch?

@chrmarti
Copy link
Collaborator Author

chrmarti commented Oct 2, 2023

@kryops This is the right place, thanks.

@chrmarti chrmarti modified the milestones: October 2023, Backlog Oct 26, 2023
@chrmarti chrmarti added feature-request Request for new features or functionality and removed plan-item VS Code - planned item for upcoming labels Oct 26, 2023
@kryops
Copy link

kryops commented Dec 12, 2024

The system certificate support for fetch seems to have been fixed by #233104 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Request for new features or functionality proxy Issues regarding network proxies
Projects
None yet
Development

No branches or pull requests

3 participants