Skip to content

Commit ebc13c2

Browse files
authored
Preserve port properties when making port public (microsoft#182610)
1 parent fb8bf97 commit ebc13c2

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/vs/workbench/contrib/remote/browser/remoteExplorer.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -367,11 +367,15 @@ class OnAutoForwardedAction extends Disposable {
367367
return {
368368
label: nls.localize('remote.tunnelsView.makePublic', "Make Public"),
369369
run: async () => {
370+
const oldTunnelDetails = mapHasAddressLocalhostOrAllInterfaces(this.remoteExplorerService.tunnelModel.forwarded, tunnel.tunnelRemoteHost, tunnel.tunnelRemotePort);
370371
await this.remoteExplorerService.close({ host: tunnel.tunnelRemoteHost, port: tunnel.tunnelRemotePort }, TunnelCloseReason.Other);
371372
return this.remoteExplorerService.forward({
372373
remote: { host: tunnel.tunnelRemoteHost, port: tunnel.tunnelRemotePort },
373374
local: tunnel.tunnelLocalPort,
375+
name: oldTunnelDetails?.name,
376+
elevateIfNeeded: true,
374377
privacy: TunnelPrivacyId.Public,
378+
source: oldTunnelDetails?.source
375379
});
376380
}
377381
};

0 commit comments

Comments
 (0)