microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
164.88k stars 29.52k forks source link

Cannot use asExternalUri with remote-tunnel in companion extension #227253

Open nisargjhaveri opened 3 months ago

nisargjhaveri commented 3 months ago

Does this issue occur when all extensions are disabled?: Yes

Steps to Reproduce:

  1. Connect using remote-tunnel for remote development
  2. Have a server running on the remote machine and forward the port and have the local URI using vscode.env.asExternalUri.
  3. Have an extension running on UI host programmatically connect to this URI. The UI-side extension is designed to work with a remote-side extension as companion which starts the server on the remote.
  4. Notice that this works well in remote-ssh, but with remote-tunnel, the companion extension cannot connect to the forwarded URI with authentication failure.

How can the companion extension authenticate to this URL forwarded inside the same VS Code session?

nisargjhaveri commented 2 months ago

@connor4312 Any suggestions on how to go about this?