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

Update @vscode/proxy-agent and enable new cert loading #193195

Merged
merged 1 commit into from
Sep 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
"@parcel/watcher": "2.1.0",
"@vscode/iconv-lite-umd": "0.7.0",
"@vscode/policy-watcher": "^1.1.4",
"@vscode/proxy-agent": "^0.17.2",
"@vscode/proxy-agent": "^0.17.3",
"@vscode/ripgrep": "^1.15.5",
"@vscode/spdlog": "^0.13.11",
"@vscode/sqlite3": "5.1.6-vscode",
Expand Down
2 changes: 1 addition & 1 deletion remote/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"@microsoft/1ds-post-js": "^3.2.13",
"@parcel/watcher": "2.1.0",
"@vscode/iconv-lite-umd": "0.7.0",
"@vscode/proxy-agent": "^0.17.2",
"@vscode/proxy-agent": "^0.17.3",
"@vscode/ripgrep": "^1.15.5",
"@vscode/spdlog": "^0.13.11",
"@vscode/vscode-languagedetection": "1.0.21",
Expand Down
8 changes: 4 additions & 4 deletions remote/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,10 @@
resolved "https://registry.yarnpkg.com/@vscode/iconv-lite-umd/-/iconv-lite-umd-0.7.0.tgz#d2f1e0664ee6036408f9743fee264ea0699b0e48"
integrity sha512-bRRFxLfg5dtAyl5XyiVWz/ZBPahpOpPrNYnnHpOpUZvam4tKH35wdhP4Kj6PbM0+KdliOsPzbGWpkxcdpNB/sg==

"@vscode/proxy-agent@^0.17.2":
version "0.17.2"
resolved "https://registry.yarnpkg.com/@vscode/proxy-agent/-/proxy-agent-0.17.2.tgz#0e0dac24478e2d71a4fd1b2bb5f84dc61add79e2"
integrity sha512-aKRo1YfUCsgEjHvr2HXfM6dwHhieyO6G+WHly7jewyyTJ1nANWEocS3JRnRbC4KjlajKhSUEOx838cdnY/vRtA==
"@vscode/proxy-agent@^0.17.3":
version "0.17.3"
resolved "https://registry.yarnpkg.com/@vscode/proxy-agent/-/proxy-agent-0.17.3.tgz#ae46cb64d58a1a2ba063321eb4e3339eaba703b8"
integrity sha512-l+00ALcWQyDsW3kd22uOeAn84KHFkixnk/STiBFRxltbTiaiJsHCCpjlmX+x/RK+B97FcRLlg+MRRb7jtWAnng==
dependencies:
"@tootallnate/once" "^3.0.0"
agent-base "^7.0.1"
Expand Down
22 changes: 18 additions & 4 deletions src/vs/workbench/api/node/proxyResolver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ import { MainThreadTelemetryShape } from 'vs/workbench/api/common/extHost.protoc
import { IExtensionHostInitData } from 'vs/workbench/services/extensions/common/extensionHostProtocol';
import { ExtHostExtensionService } from 'vs/workbench/api/node/extHostExtensionService';
import { URI } from 'vs/base/common/uri';
import { ILogService } from 'vs/platform/log/common/log';
import { ILogService, LogLevel as LogServiceLevel } from 'vs/platform/log/common/log';
import { IExtensionDescription } from 'vs/platform/extensions/common/extensions';
import { LogLevel, createHttpPatch, createProxyResolver, createTlsPatch, ProxySupportSetting, ProxyAgentParams, createNetPatch } from '@vscode/proxy-agent';

const systemCertificatesV2Default = false;
const systemCertificatesV2Default = true;

export function connectProxyResolver(
extHostWorkspace: IExtHostWorkspaceProvider,
Expand Down Expand Up @@ -53,8 +53,22 @@ export function connectProxyResolver(
extHostLogService.error(message, ...args);
}
},
getLogLevel: () => extHostLogService.getLevel(),
// TODO @chrmarti Remove this from proxy agent
getLogLevel: () => {
const level = extHostLogService.getLevel();
switch (level) {
case LogServiceLevel.Trace: return LogLevel.Trace;
case LogServiceLevel.Debug: return LogLevel.Debug;
case LogServiceLevel.Info: return LogLevel.Info;
case LogServiceLevel.Warning: return LogLevel.Warning;
case LogServiceLevel.Error: return LogLevel.Error;
case LogServiceLevel.Off: return LogLevel.Off;
default: return never(level);
}
function never(level: never) {
extHostLogService.error('Unknown log level', level);
return LogLevel.Debug;
}
},
proxyResolveTelemetry: () => { },
useHostProxy: doUseHostProxy,
addCertificates: [],
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1304,10 +1304,10 @@
bindings "^1.5.0"
node-addon-api "^6.0.0"

"@vscode/proxy-agent@^0.17.2":
version "0.17.2"
resolved "https://registry.yarnpkg.com/@vscode/proxy-agent/-/proxy-agent-0.17.2.tgz#0e0dac24478e2d71a4fd1b2bb5f84dc61add79e2"
integrity sha512-aKRo1YfUCsgEjHvr2HXfM6dwHhieyO6G+WHly7jewyyTJ1nANWEocS3JRnRbC4KjlajKhSUEOx838cdnY/vRtA==
"@vscode/proxy-agent@^0.17.3":
version "0.17.3"
resolved "https://registry.yarnpkg.com/@vscode/proxy-agent/-/proxy-agent-0.17.3.tgz#ae46cb64d58a1a2ba063321eb4e3339eaba703b8"
integrity sha512-l+00ALcWQyDsW3kd22uOeAn84KHFkixnk/STiBFRxltbTiaiJsHCCpjlmX+x/RK+B97FcRLlg+MRRb7jtWAnng==
dependencies:
"@tootallnate/once" "^3.0.0"
agent-base "^7.0.1"
Expand Down