Skip to content

Commit 6504980

Browse files
authored
Include tunnel privacy in embedder openTunnel (microsoft#158166)
* Include tunnel privacy in embedder openTunnel * Add other tunnel attributes
1 parent f250d3f commit 6504980

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

src/vs/workbench/browser/web.main.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ import { dirname, joinPath } from 'vs/base/common/resources';
7676
import { IUserDataProfilesService, PROFILES_ENABLEMENT_CONFIG } from 'vs/platform/userDataProfile/common/userDataProfile';
7777
import { NullPolicyService } from 'vs/platform/policy/common/policy';
7878
import { IRemoteExplorerService, TunnelSource } from 'vs/workbench/services/remote/common/remoteExplorerService';
79-
import { DisposableTunnel } from 'vs/platform/tunnel/common/tunnel';
79+
import { DisposableTunnel, TunnelProtocol } from 'vs/platform/tunnel/common/tunnel';
8080
import { ILabelService } from 'vs/platform/label/common/label';
8181
import { UserDataProfileService } from 'vs/workbench/services/userDataProfile/common/userDataProfileService';
8282
import { IUserDataProfileService } from 'vs/workbench/services/userDataProfile/common/userDataProfile';
@@ -181,7 +181,15 @@ export class BrowserMain extends Disposable {
181181
source: TunnelSource.Extension,
182182
description: labelService.getHostLabel(Schemas.vscodeRemote, this.configuration.remoteAuthority)
183183
},
184-
elevateIfNeeded: false
184+
elevateIfNeeded: false,
185+
privacy: tunnelOptions.privacy
186+
}, {
187+
label: tunnelOptions.label,
188+
elevateIfNeeded: undefined,
189+
onAutoForward: undefined,
190+
requireLocalPort: undefined,
191+
protocol: tunnelOptions.protocol === TunnelProtocol.Https ? tunnelOptions.protocol : TunnelProtocol.Http,
192+
185193
});
186194
if (!tunnel) {
187195
throw new Error('cannot open tunnel');

0 commit comments

Comments
 (0)