Skip to content

Commit 0ac843a

Browse files
authored
Tunnel: Fix host name issue (microsoft#164708)
1 parent c3eebae commit 0ac843a

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/vs/platform/remoteTunnel/electron-browser/remoteTunnelService.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ export class RemoteTunnelService extends Disposable implements IRemoteTunnelServ
170170
} else {
171171
this._logger.info(message);
172172
}
173-
const m = message.match(/^\s*Open this link in your browser (https:\/\/([^\/]+)\/([^\/]+)\/([^\/]+))/);
173+
const m = message.match(/^\s*Open this link in your browser (https:\/\/([^\/\s]+)\/([^\/\s]+)\/([^\/\s]+))/);
174174
if (m) {
175175
const info: ConnectionInfo = { link: m[1], domain: m[2], extensionId: 'ms-vscode.remote-server', hostName: m[4] };
176176
this.setTunnelStatus(TunnelStates.connected(info));
@@ -217,9 +217,6 @@ export class RemoteTunnelService extends Disposable implements IRemoteTunnelServ
217217
tunnelProcess.kill();
218218
}
219219
});
220-
this._logger.info(`${logLabel} appRoot ${this.environmentService.appRoot}`);
221-
this._logger.info(`${logLabel} process.execPath ${process.execPath}`);
222-
223220
if (process.env['VSCODE_DEV']) {
224221
onOutput('Compiling tunnel CLI from sources and run', false);
225222
onOutput(`${logLabel} Spawning: cargo run -- tunnel ${commandArgs.join(' ')}`, false);
@@ -272,7 +269,7 @@ export class RemoteTunnelService extends Disposable implements IRemoteTunnelServ
272269
}
273270
const hostName = hostname();
274271
if (hostName && hostName.match(/^([\w-]+)$/)) {
275-
return hostName;
272+
return hostName.substring(0, 20);
276273
}
277274

278275
return undefined;

0 commit comments

Comments
 (0)