Skip to content

Commit

Permalink
Update @vscode/proxy-agent and enable new cert loading
Browse files Browse the repository at this point in the history
  • Loading branch information
chrmarti committed Sep 15, 2023
1 parent ec45a64 commit ca1d549
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 12 deletions.
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": "https://github.com/microsoft/vscode-proxy-agent.git#1b16158bafe320ae2459385450270bf7999d42a7",
"@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": "https://github.com/microsoft/vscode-proxy-agent.git#1b16158bafe320ae2459385450270bf7999d42a7",
"@vscode/ripgrep": "^1.15.5",
"@vscode/spdlog": "^0.13.11",
"@vscode/vscode-languagedetection": "1.0.21",
Expand Down
5 changes: 2 additions & 3 deletions remote/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,9 @@
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":
"@vscode/proxy-agent@https://github.com/microsoft/vscode-proxy-agent.git#1b16158bafe320ae2459385450270bf7999d42a7":
version "0.17.2"
resolved "https://registry.yarnpkg.com/@vscode/proxy-agent/-/proxy-agent-0.17.2.tgz#0e0dac24478e2d71a4fd1b2bb5f84dc61add79e2"
integrity sha512-aKRo1YfUCsgEjHvr2HXfM6dwHhieyO6G+WHly7jewyyTJ1nANWEocS3JRnRbC4KjlajKhSUEOx838cdnY/vRtA==
resolved "https://github.com/microsoft/vscode-proxy-agent.git#1b16158bafe320ae2459385450270bf7999d42a7"
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
5 changes: 2 additions & 3 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1304,10 +1304,9 @@
bindings "^1.5.0"
node-addon-api "^6.0.0"

"@vscode/proxy-agent@^0.17.2":
"@vscode/proxy-agent@https://github.com/microsoft/vscode-proxy-agent.git#1b16158bafe320ae2459385450270bf7999d42a7":
version "0.17.2"
resolved "https://registry.yarnpkg.com/@vscode/proxy-agent/-/proxy-agent-0.17.2.tgz#0e0dac24478e2d71a4fd1b2bb5f84dc61add79e2"
integrity sha512-aKRo1YfUCsgEjHvr2HXfM6dwHhieyO6G+WHly7jewyyTJ1nANWEocS3JRnRbC4KjlajKhSUEOx838cdnY/vRtA==
resolved "https://github.com/microsoft/vscode-proxy-agent.git#1b16158bafe320ae2459385450270bf7999d42a7"
dependencies:
"@tootallnate/once" "^3.0.0"
agent-base "^7.0.1"
Expand Down

0 comments on commit ca1d549

Please sign in to comment.