mirror of
https://github.com/microsoft/vscode.git
synced 2025-12-24 20:26:08 +00:00
@@ -7,7 +7,7 @@ import * as nls from 'vs/nls';
|
||||
import { MainThreadTunnelServiceShape, MainContext, ExtHostContext, ExtHostTunnelServiceShape, CandidatePortSource, PortAttributesSelector, TunnelDto } from 'vs/workbench/api/common/extHost.protocol';
|
||||
import { TunnelDtoConverter } from 'vs/workbench/api/common/extHostTunnelService';
|
||||
import { extHostNamedCustomer, IExtHostContext } from 'vs/workbench/services/extensions/common/extHostCustomers';
|
||||
import { IRemoteExplorerService, PORT_AUTO_FORWARD_SETTING, PORT_AUTO_SOURCE_SETTING, PORT_AUTO_SOURCE_SETTING_OUTPUT } from 'vs/workbench/services/remote/common/remoteExplorerService';
|
||||
import { IRemoteExplorerService, PORT_AUTO_FORWARD_SETTING, PORT_AUTO_SOURCE_SETTING, PORT_AUTO_SOURCE_SETTING_HYBRID, PORT_AUTO_SOURCE_SETTING_OUTPUT } from 'vs/workbench/services/remote/common/remoteExplorerService';
|
||||
import { ITunnelProvider, ITunnelService, TunnelCreationOptions, TunnelProviderFeatures, TunnelOptions, RemoteTunnel, ProvidedPortAttributes, PortAttributesProvider, TunnelProtocol } from 'vs/platform/tunnel/common/tunnel';
|
||||
import { Disposable } from 'vs/base/common/lifecycle';
|
||||
import type { TunnelDescription } from 'vs/platform/remote/common/remoteAuthorityResolver';
|
||||
@@ -223,6 +223,11 @@ export class MainThreadTunnelService extends Disposable implements MainThreadTun
|
||||
.registerDefaultConfigurations([{ overrides: { 'remote.autoForwardPortsSource': PORT_AUTO_SOURCE_SETTING_OUTPUT } }]);
|
||||
break;
|
||||
}
|
||||
case CandidatePortSource.Hybrid: {
|
||||
Registry.as<IConfigurationRegistry>(ConfigurationExtensions.Configuration)
|
||||
.registerDefaultConfigurations([{ overrides: { 'remote.autoForwardPortsSource': PORT_AUTO_SOURCE_SETTING_HYBRID } }]);
|
||||
break;
|
||||
}
|
||||
default: // Do nothing, the defaults for these settings should be used.
|
||||
}
|
||||
}).catch(() => {
|
||||
|
||||
@@ -1598,7 +1598,8 @@ export interface MainThreadWindowShape extends IDisposable {
|
||||
export enum CandidatePortSource {
|
||||
None = 0,
|
||||
Process = 1,
|
||||
Output = 2
|
||||
Output = 2,
|
||||
Hybrid = 3
|
||||
}
|
||||
|
||||
export interface PortAttributesSelector {
|
||||
|
||||
@@ -141,7 +141,8 @@ declare module 'vscode' {
|
||||
export enum CandidatePortSource {
|
||||
None = 0,
|
||||
Process = 1,
|
||||
Output = 2
|
||||
Output = 2,
|
||||
Hybrid = 3
|
||||
}
|
||||
|
||||
export type ResolverResult = (ResolvedAuthority | ManagedResolvedAuthority) & ResolvedOptions & TunnelInformation;
|
||||
|
||||
Reference in New Issue
Block a user