Skip to content

Commit

Permalink
useHostProxy > isUseHostProxyEnabled() (microsoft/vscode-copilot-rele…
Browse files Browse the repository at this point in the history
  • Loading branch information
chrmarti committed Jan 16, 2025
1 parent b1f8f2e commit 5f5594d
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Change Log
Notable changes will be documented here.

## [0.30.0]
- useHostProxy > isUseHostProxyEnabled() ([microsoft/vscode-copilot-release#3821](https://github.com/microsoft/vscode-copilot-release/issues/3821))

## [0.29.0]
- Update to undici 7.2.0 ([microsoft/vscode-proxy-agent#57](https://github.com/microsoft/vscode-proxy-agent/pull/57))
- Get options from unpatched agents ([microsoft/vscode-proxy-agent#58](https://github.com/microsoft/vscode-proxy-agent/pull/58))
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vscode/proxy-agent",
"version": "0.29.0",
"version": "0.30.0",
"description": "NodeJS http(s) agent implementation for VS Code",
"main": "out/index.js",
"types": "out/index.d.ts",
Expand Down
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ export interface ProxyAgentParams {
log: Log;
getLogLevel(): LogLevel;
proxyResolveTelemetry(event: ProxyResolveEvent): void;
useHostProxy: boolean;
isUseHostProxyEnabled: () => boolean;
env: NodeJS.ProcessEnv;
}

Expand Down Expand Up @@ -207,7 +207,7 @@ export function createProxyResolver(params: ProxyAgentParams) {
return;
}

if (!params.useHostProxy) {
if (!params.isUseHostProxyEnabled()) {
callback('DIRECT');
log.debug('ProxyResolver#resolveProxy unconfigured', url, 'DIRECT', stackText);
return;
Expand Down
2 changes: 1 addition & 1 deletion tests/test-client/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export const directProxyAgentParams: vpa.ProxyAgentParams = {
log: console,
getLogLevel: () => vpa.LogLevel.Trace,
proxyResolveTelemetry: () => undefined,
useHostProxy: true,
isUseHostProxyEnabled: () => true,
loadAdditionalCertificates: async () => [
...await loadSystemCertificates({ log: console }),
...ca,
Expand Down

0 comments on commit 5f5594d

Please sign in to comment.