mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
add flag for proxy (#15120)
* add flag for proxy * update distro hash * Bump distro hash * Bump distro Co-authored-by: kburtram <karlb@microsoft.com> Co-authored-by: chgagnon <chgagnon@microsoft.com>
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "azuredatastudio",
|
"name": "azuredatastudio",
|
||||||
"version": "1.28.0",
|
"version": "1.28.0",
|
||||||
"distro": "0de18a407aaa6294c15918753b6032c7bb919aaf",
|
"distro": "1d8bd1032738ec5b6aad0b80551eee7376a617dc",
|
||||||
"author": {
|
"author": {
|
||||||
"name": "Microsoft Corporation"
|
"name": "Microsoft Corporation"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ export interface IRemoteAgentEnvironment {
|
|||||||
workspaceStorageHome: URI;
|
workspaceStorageHome: URI;
|
||||||
userHome: URI;
|
userHome: URI;
|
||||||
os: OperatingSystem;
|
os: OperatingSystem;
|
||||||
|
useHostProxy: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface RemoteAgentConnectionContext {
|
export interface RemoteAgentConnectionContext {
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
import { localize } from 'vs/nls';
|
import { localize } from 'vs/nls';
|
||||||
import { CancellationToken } from 'vs/base/common/cancellation';
|
import { CancellationToken } from 'vs/base/common/cancellation';
|
||||||
import { createDecorator } from 'vs/platform/instantiation/common/instantiation';
|
import { createDecorator } from 'vs/platform/instantiation/common/instantiation';
|
||||||
import { IConfigurationRegistry, Extensions } from 'vs/platform/configuration/common/configurationRegistry';
|
import { IConfigurationRegistry, Extensions, ConfigurationScope, IConfigurationNode } from 'vs/platform/configuration/common/configurationRegistry';
|
||||||
import { Registry } from 'vs/platform/registry/common/platform';
|
import { Registry } from 'vs/platform/registry/common/platform';
|
||||||
import { streamToBuffer } from 'vs/base/common/buffer';
|
import { streamToBuffer } from 'vs/base/common/buffer';
|
||||||
import { IRequestOptions, IRequestContext } from 'vs/base/parts/request/common/request';
|
import { IRequestOptions, IRequestContext } from 'vs/base/parts/request/common/request';
|
||||||
@@ -66,12 +66,22 @@ export interface IHTTPConfiguration {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
Registry.as<IConfigurationRegistry>(Extensions.Configuration)
|
export function updateProxyConfigurationsScope(scope: ConfigurationScope): void {
|
||||||
.registerConfiguration({
|
registerProxyConfigurations(scope);
|
||||||
|
}
|
||||||
|
|
||||||
|
let proxyConfiguration: IConfigurationNode | undefined;
|
||||||
|
function registerProxyConfigurations(scope: ConfigurationScope): void {
|
||||||
|
const configurationRegistry = Registry.as<IConfigurationRegistry>(Extensions.Configuration);
|
||||||
|
if (proxyConfiguration) {
|
||||||
|
configurationRegistry.deregisterConfigurations([proxyConfiguration]);
|
||||||
|
}
|
||||||
|
proxyConfiguration = {
|
||||||
id: 'http',
|
id: 'http',
|
||||||
order: 15,
|
order: 15,
|
||||||
title: localize('httpConfigurationTitle', "HTTP"),
|
title: localize('httpConfigurationTitle', "HTTP"),
|
||||||
type: 'object',
|
type: 'object',
|
||||||
|
scope,
|
||||||
properties: {
|
properties: {
|
||||||
'http.proxy': {
|
'http.proxy': {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
@@ -105,4 +115,8 @@ Registry.as<IConfigurationRegistry>(Extensions.Configuration)
|
|||||||
description: localize('systemCertificates', "Controls whether CA certificates should be loaded from the OS. (On Windows and macOS a reload of the window is required after turning this off.)")
|
description: localize('systemCertificates', "Controls whether CA certificates should be loaded from the OS. (On Windows and macOS a reload of the window is required after turning this off.)")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
};
|
||||||
|
configurationRegistry.registerConfiguration(proxyConfiguration);
|
||||||
|
}
|
||||||
|
|
||||||
|
registerProxyConfigurations(ConfigurationScope.MACHINE);
|
||||||
|
|||||||
@@ -40,6 +40,8 @@ import { ILogService } from 'vs/platform/log/common/log';
|
|||||||
import { CATEGORIES } from 'vs/workbench/common/actions';
|
import { CATEGORIES } from 'vs/workbench/common/actions';
|
||||||
import { Schemas } from 'vs/base/common/network';
|
import { Schemas } from 'vs/base/common/network';
|
||||||
import { ExtensionHostExitCode } from 'vs/workbench/services/extensions/common/extensionHostProtocol';
|
import { ExtensionHostExitCode } from 'vs/workbench/services/extensions/common/extensionHostProtocol';
|
||||||
|
import { updateProxyConfigurationsScope } from 'vs/platform/request/common/request';
|
||||||
|
import { ConfigurationScope } from 'vs/platform/configuration/common/configurationRegistry';
|
||||||
|
|
||||||
export class ExtensionService extends AbstractExtensionService implements IExtensionService {
|
export class ExtensionService extends AbstractExtensionService implements IExtensionService {
|
||||||
|
|
||||||
@@ -336,6 +338,8 @@ export class ExtensionService extends AbstractExtensionService implements IExten
|
|||||||
await this._startLocalExtensionHost(localExtensions);
|
await this._startLocalExtensionHost(localExtensions);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
updateProxyConfigurationsScope(remoteEnv.useHostProxy ? ConfigurationScope.APPLICATION : ConfigurationScope.MACHINE);
|
||||||
}
|
}
|
||||||
|
|
||||||
await this._startLocalExtensionHost(localExtensions, remoteAuthority, remoteEnv, remoteExtensions);
|
await this._startLocalExtensionHost(localExtensions, remoteAuthority, remoteEnv, remoteExtensions);
|
||||||
|
|||||||
@@ -41,6 +41,7 @@ export interface IRemoteAgentEnvironmentDTO {
|
|||||||
workspaceStorageHome: UriComponents;
|
workspaceStorageHome: UriComponents;
|
||||||
userHome: UriComponents;
|
userHome: UriComponents;
|
||||||
os: platform.OperatingSystem;
|
os: platform.OperatingSystem;
|
||||||
|
useHostProxy: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
export class RemoteExtensionEnvironmentChannelClient {
|
export class RemoteExtensionEnvironmentChannelClient {
|
||||||
@@ -63,7 +64,8 @@ export class RemoteExtensionEnvironmentChannelClient {
|
|||||||
globalStorageHome: URI.revive(data.globalStorageHome),
|
globalStorageHome: URI.revive(data.globalStorageHome),
|
||||||
workspaceStorageHome: URI.revive(data.workspaceStorageHome),
|
workspaceStorageHome: URI.revive(data.workspaceStorageHome),
|
||||||
userHome: URI.revive(data.userHome),
|
userHome: URI.revive(data.userHome),
|
||||||
os: data.os
|
os: data.os,
|
||||||
|
useHostProxy: data.useHostProxy
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user