mirror of
https://github.com/microsoft/vscode.git
synced 2025-12-20 02:08:47 +00:00
Remember when ticket was requested (#187456)
This commit is contained in:
@@ -70,7 +70,7 @@
|
|||||||
"@parcel/watcher": "2.1.0",
|
"@parcel/watcher": "2.1.0",
|
||||||
"@vscode/iconv-lite-umd": "0.7.0",
|
"@vscode/iconv-lite-umd": "0.7.0",
|
||||||
"@vscode/policy-watcher": "^1.1.4",
|
"@vscode/policy-watcher": "^1.1.4",
|
||||||
"@vscode/proxy-agent": "^0.17.0",
|
"@vscode/proxy-agent": "^0.17.1",
|
||||||
"@vscode/ripgrep": "^1.15.5",
|
"@vscode/ripgrep": "^1.15.5",
|
||||||
"@vscode/spdlog": "^0.13.10",
|
"@vscode/spdlog": "^0.13.10",
|
||||||
"@vscode/sqlite3": "5.1.6-vscode",
|
"@vscode/sqlite3": "5.1.6-vscode",
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
"@microsoft/1ds-post-js": "^3.2.2",
|
"@microsoft/1ds-post-js": "^3.2.2",
|
||||||
"@parcel/watcher": "2.1.0",
|
"@parcel/watcher": "2.1.0",
|
||||||
"@vscode/iconv-lite-umd": "0.7.0",
|
"@vscode/iconv-lite-umd": "0.7.0",
|
||||||
"@vscode/proxy-agent": "^0.17.0",
|
"@vscode/proxy-agent": "^0.17.1",
|
||||||
"@vscode/ripgrep": "^1.15.5",
|
"@vscode/ripgrep": "^1.15.5",
|
||||||
"@vscode/spdlog": "^0.13.10",
|
"@vscode/spdlog": "^0.13.10",
|
||||||
"@vscode/vscode-languagedetection": "1.0.21",
|
"@vscode/vscode-languagedetection": "1.0.21",
|
||||||
|
|||||||
@@ -58,10 +58,10 @@
|
|||||||
resolved "https://registry.yarnpkg.com/@vscode/iconv-lite-umd/-/iconv-lite-umd-0.7.0.tgz#d2f1e0664ee6036408f9743fee264ea0699b0e48"
|
resolved "https://registry.yarnpkg.com/@vscode/iconv-lite-umd/-/iconv-lite-umd-0.7.0.tgz#d2f1e0664ee6036408f9743fee264ea0699b0e48"
|
||||||
integrity sha512-bRRFxLfg5dtAyl5XyiVWz/ZBPahpOpPrNYnnHpOpUZvam4tKH35wdhP4Kj6PbM0+KdliOsPzbGWpkxcdpNB/sg==
|
integrity sha512-bRRFxLfg5dtAyl5XyiVWz/ZBPahpOpPrNYnnHpOpUZvam4tKH35wdhP4Kj6PbM0+KdliOsPzbGWpkxcdpNB/sg==
|
||||||
|
|
||||||
"@vscode/proxy-agent@^0.17.0":
|
"@vscode/proxy-agent@^0.17.1":
|
||||||
version "0.17.0"
|
version "0.17.1"
|
||||||
resolved "https://registry.yarnpkg.com/@vscode/proxy-agent/-/proxy-agent-0.17.0.tgz#e60d43e2779c07c223d3bad9b7de8eedf7ca1294"
|
resolved "https://registry.yarnpkg.com/@vscode/proxy-agent/-/proxy-agent-0.17.1.tgz#00ea42fb3565c78c38bc99a73d4460db538aef4e"
|
||||||
integrity sha512-p4gJ57KeWGw0CEG9R13dmsgmWmszoOQ836pf/PVbAf+ZRF27il3QcFvOhA10XE2QFHaOcRxuJnnIpUD1lSMvqQ==
|
integrity sha512-KWQ5y2uB6547Oudx2TMV28PdcdqNzI4J7TZzhZht1kNra8spqOzQJXw6gBdoh2mMFVpNiKgVhZ9YinWR0BZHiw==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@tootallnate/once" "^3.0.0"
|
"@tootallnate/once" "^3.0.0"
|
||||||
agent-base "^7.0.1"
|
agent-base "^7.0.1"
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ export function connectProxyResolver(
|
|||||||
const doUseHostProxy = typeof useHostProxy === 'boolean' ? useHostProxy : !initData.remote.isRemote;
|
const doUseHostProxy = typeof useHostProxy === 'boolean' ? useHostProxy : !initData.remote.isRemote;
|
||||||
const params: ProxyAgentParams = {
|
const params: ProxyAgentParams = {
|
||||||
resolveProxy: url => extHostWorkspace.resolveProxy(url),
|
resolveProxy: url => extHostWorkspace.resolveProxy(url),
|
||||||
lookupProxyAuthorization: lookupProxyAuthorization.bind(undefined, extHostLogService, configProvider, {}, {}),
|
lookupProxyAuthorization: lookupProxyAuthorization.bind(undefined, extHostLogService, configProvider, {}),
|
||||||
getProxyURL: () => configProvider.getConfiguration('http').get('proxy'),
|
getProxyURL: () => configProvider.getConfiguration('http').get('proxy'),
|
||||||
getProxySupport: () => configProvider.getConfiguration('http').get<ProxySupportSetting>('proxySupport') || 'off',
|
getProxySupport: () => configProvider.getConfiguration('http').get<ProxySupportSetting>('proxySupport') || 'off',
|
||||||
getSystemCertificatesV1: () => certSettingV1(configProvider),
|
getSystemCertificatesV1: () => certSettingV1(configProvider),
|
||||||
@@ -121,9 +121,9 @@ async function lookupProxyAuthorization(
|
|||||||
extHostLogService: ILogService,
|
extHostLogService: ILogService,
|
||||||
configProvider: ExtHostConfigProvider,
|
configProvider: ExtHostConfigProvider,
|
||||||
proxyAuthenticateCache: Record<string, string | string[] | undefined>,
|
proxyAuthenticateCache: Record<string, string | string[] | undefined>,
|
||||||
pendingLookups: Record<string, Promise<string | undefined>>,
|
|
||||||
proxyURL: string,
|
proxyURL: string,
|
||||||
proxyAuthenticate?: string | string[]
|
proxyAuthenticate: string | string[] | undefined,
|
||||||
|
state: { kerberosRequested?: boolean }
|
||||||
): Promise<string | undefined> {
|
): Promise<string | undefined> {
|
||||||
const cached = proxyAuthenticateCache[proxyURL];
|
const cached = proxyAuthenticateCache[proxyURL];
|
||||||
if (proxyAuthenticate) {
|
if (proxyAuthenticate) {
|
||||||
@@ -132,25 +132,20 @@ async function lookupProxyAuthorization(
|
|||||||
extHostLogService.trace('ProxyResolver#lookupProxyAuthorization callback', `proxyURL:${proxyURL}`, `proxyAuthenticate:${proxyAuthenticate}`, `proxyAuthenticateCache:${cached}`);
|
extHostLogService.trace('ProxyResolver#lookupProxyAuthorization callback', `proxyURL:${proxyURL}`, `proxyAuthenticate:${proxyAuthenticate}`, `proxyAuthenticateCache:${cached}`);
|
||||||
const header = proxyAuthenticate || cached;
|
const header = proxyAuthenticate || cached;
|
||||||
const authenticate = Array.isArray(header) ? header : typeof header === 'string' ? [header] : [];
|
const authenticate = Array.isArray(header) ? header : typeof header === 'string' ? [header] : [];
|
||||||
if (authenticate.some(a => /^(Negotiate|Kerberos)( |$)/i.test(a))) {
|
if (authenticate.some(a => /^(Negotiate|Kerberos)( |$)/i.test(a)) && !state.kerberosRequested) {
|
||||||
const lookupKey = `${proxyURL}:Negotiate`;
|
try {
|
||||||
return pendingLookups[lookupKey] ??= (async () => {
|
state.kerberosRequested = true;
|
||||||
try {
|
const kerberos = await import('kerberos');
|
||||||
const kerberos = await import('kerberos');
|
const url = new URL(proxyURL);
|
||||||
const url = new URL(proxyURL);
|
const spn = configProvider.getConfiguration('http').get<string>('proxyKerberosServicePrincipal')
|
||||||
const spn = configProvider.getConfiguration('http').get<string>('proxyKerberosServicePrincipal')
|
|| (process.platform === 'win32' ? `HTTP/${url.hostname}` : `HTTP@${url.hostname}`);
|
||||||
|| (process.platform === 'win32' ? `HTTP/${url.hostname}` : `HTTP@${url.hostname}`);
|
extHostLogService.debug('ProxyResolver#lookupProxyAuthorization Kerberos authentication lookup', `proxyURL:${proxyURL}`, `spn:${spn}`);
|
||||||
extHostLogService.debug('ProxyResolver#lookupProxyAuthorization Kerberos authentication lookup', `proxyURL:${proxyURL}`, `spn:${spn}`);
|
const client = await kerberos.initializeClient(spn);
|
||||||
const client = await kerberos.initializeClient(spn);
|
const response = await client.step('');
|
||||||
const response = await client.step('');
|
return 'Negotiate ' + response;
|
||||||
return 'Negotiate ' + response;
|
} catch (err) {
|
||||||
} catch (err) {
|
extHostLogService.error('ProxyResolver#lookupProxyAuthorization Kerberos authentication failed', err);
|
||||||
extHostLogService.error('ProxyResolver#lookupProxyAuthorization Kerberos authentication failed', err);
|
}
|
||||||
return undefined;
|
|
||||||
} finally {
|
|
||||||
delete pendingLookups[lookupKey];
|
|
||||||
}
|
|
||||||
})();
|
|
||||||
}
|
}
|
||||||
return undefined;
|
return undefined;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1309,10 +1309,10 @@
|
|||||||
bindings "^1.5.0"
|
bindings "^1.5.0"
|
||||||
node-addon-api "^6.0.0"
|
node-addon-api "^6.0.0"
|
||||||
|
|
||||||
"@vscode/proxy-agent@^0.17.0":
|
"@vscode/proxy-agent@^0.17.1":
|
||||||
version "0.17.0"
|
version "0.17.1"
|
||||||
resolved "https://registry.yarnpkg.com/@vscode/proxy-agent/-/proxy-agent-0.17.0.tgz#e60d43e2779c07c223d3bad9b7de8eedf7ca1294"
|
resolved "https://registry.yarnpkg.com/@vscode/proxy-agent/-/proxy-agent-0.17.1.tgz#00ea42fb3565c78c38bc99a73d4460db538aef4e"
|
||||||
integrity sha512-p4gJ57KeWGw0CEG9R13dmsgmWmszoOQ836pf/PVbAf+ZRF27il3QcFvOhA10XE2QFHaOcRxuJnnIpUD1lSMvqQ==
|
integrity sha512-KWQ5y2uB6547Oudx2TMV28PdcdqNzI4J7TZzhZht1kNra8spqOzQJXw6gBdoh2mMFVpNiKgVhZ9YinWR0BZHiw==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@tootallnate/once" "^3.0.0"
|
"@tootallnate/once" "^3.0.0"
|
||||||
agent-base "^7.0.1"
|
agent-base "^7.0.1"
|
||||||
|
|||||||
Reference in New Issue
Block a user