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

Investigate using Electron's `resolveProxy` API in order to better handle requests behind proxies #60773

Open
joaomoreno opened this Issue Oct 12, 2018 · 13 comments

Comments

Projects
None yet
5 participants
@joaomoreno
Copy link
Member

joaomoreno commented Oct 12, 2018

https://github.com/electron/electron/blob/master/docs/api/session.md#sesresolveproxyurl-callback

Also: https://github.com/felicienfrancois/node-electron-proxy-agent

From @chrmarti:

Seems reasonably simple. Maybe we can just adapt that for the extension host. We might need a cache to ensure good performance, but that shouldn’t be too hard either.

@chrmarti

This comment has been minimized.

Copy link
Contributor

chrmarti commented Oct 12, 2018

Related links:

  • Lack of proxy support in Node.js: nodejs/node#15620
  • Modifying https.globalAgent doesn't work: nodejs/node#9057
  • There are http-proxy-agent, https-proxy-agent, socks-proxy-agent and pac-proxy-agent node modules, but none for reading the OS' proxy configuration.
@joaomoreno

This comment has been minimized.

Copy link
Member

joaomoreno commented Oct 15, 2018

@chrmarti

This comment has been minimized.

Copy link
Contributor

chrmarti commented Oct 18, 2018

chrmarti added a commit that referenced this issue Oct 22, 2018

chrmarti added a commit that referenced this issue Oct 23, 2018

chrmarti added a commit that referenced this issue Oct 28, 2018

chrmarti added a commit that referenced this issue Oct 28, 2018

@chrmarti chrmarti modified the milestones: Backlog, October 2018 Oct 28, 2018

chrmarti added a commit that referenced this issue Oct 29, 2018

chrmarti added a commit that referenced this issue Oct 29, 2018

chrmarti added a commit that referenced this issue Nov 21, 2018

chrmarti added a commit that referenced this issue Nov 23, 2018

chrmarti added a commit that referenced this issue Nov 26, 2018

chrmarti added a commit that referenced this issue Nov 26, 2018

chrmarti added a commit that referenced this issue Nov 29, 2018

@chrmarti chrmarti referenced this issue Dec 3, 2018

Closed

Test: Proxy Support #64202

2 of 2 tasks complete
@shana

This comment has been minimized.

Copy link
Member

shana commented Dec 3, 2018

We've been having some problems with authentication on the GitHub Pull Requests extension, and I've tracked it down to commit cc60804. The following code:

const get = https.request('https://vscode-auth.github.com', res => {
    vscode.window.showInformationMessage(${res.statusCode});
});
get.on('error', err => {
    vscode.window.showInformationMessage(${err});
});
get.end();

fails with

Error: write EPROTO 140735921918912:error:14077438:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert internal error:../../vendor/node/deps/openssl/openssl/ssl/s23_clnt.c:802:

This has been repro'd on multiple machines running macOS Sierra and Mojave. I have no proxy configuration on my machines. If I set "http.systemProxy": "off", requests work just fine.

/cc @rebornix

@chrmarti

This comment has been minimized.

Copy link
Contributor

chrmarti commented Dec 3, 2018

@shana Could you start with code-insiders --log=trace and check what ProxyResolver#resolveProxy entry you get in the Log (Extension Host) channel in the Output panel? (You can search with Ctrl + F / Cmd + F in there.)

@chrmarti

This comment has been minimized.

Copy link
Contributor

chrmarti commented Dec 3, 2018

@shana Can reproduce now. Looking into it.

@rebornix rebornix referenced this issue Dec 3, 2018

Closed

Plan for November 2018 #678

6 of 16 tasks complete

chrmarti added a commit that referenced this issue Dec 3, 2018

@chrmarti

This comment has been minimized.

Copy link
Contributor

chrmarti commented Dec 3, 2018

Disabling the setting by default for tomorrow's Insiders build.

@shana

This comment has been minimized.

Copy link
Member

shana commented Dec 5, 2018

@chrmarti Sorry, I've been traveling and couldn't follow up on this. Yay for repro, thanks for looking into it!

@chrmarti

This comment has been minimized.

Copy link
Contributor

chrmarti commented Dec 6, 2018

Tracking the bug as #64133.

chrmarti added a commit that referenced this issue Dec 12, 2018

@dwaq

This comment has been minimized.

Copy link

dwaq commented Dec 13, 2018

I came from the 1.3.0 release page for the network proxy support. I just wanted to let that you know that setting Http: Proxy Support to override solved a longstanding issue where I couldn't install an extension that downloaded extra software from behind a proxy. Thank you for this fix.

@dwaq

This comment has been minimized.

Copy link

dwaq commented Dec 13, 2018

Now, a request: If Http: Proxy Support continues to show good results for users, I would recommend setting it to override when a use enters anything into Http:Proxy. (Maybe there's a better way, but I'd be confused if I entered my proxy info and then found out there was another switch I needed to enable to get full functionality).

@chrmarti

This comment has been minimized.

Copy link
Contributor

chrmarti commented Dec 13, 2018

@dwaq Great! The goal is to make override the default. I have made it the default in the insiders releases (again) and will let that go into the next stable release assuming testing looks good.

@diev

This comment has been minimized.

Copy link

diev commented Dec 14, 2018

Please keep updated every whitelist domain as issued at #2278 in VS Code Docs.

@liximomo liximomo referenced this issue Dec 21, 2018

Closed

sftp/ftp proxy #440

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment