microsoft / vscode-remote-release

Visual Studio Code Remote Development: Open any folder in WSL, in a Docker container, or on a remote machine using SSH and take advantage of VS Code's full feature set.
https://aka.ms/vscode-remote
Other
3.61k stars 275 forks source link

Opening / connecting to existing tunnels from my extension #9928

Open Simon-Count opened 3 months ago

Simon-Count commented 3 months ago

Trying to connect to an existing remote tunnel from my extension. I already know that GitHub was used to create & authorize the tunnel and I know the tunnel id, because my extension initialised the tunnel.

Does executeCommand('remote-tunnels.connectCurrentWindowToTunnel', args?) take any input args so that I can skip asking the user again for things I already know?

Currently my users have to manually go through this flow again of

  1. image
  2. image

Even though I know exactly which remote tunnel they are trying to connect to as my web view consist of a list of available remote environments they can initialise tunnels or connect to existing tunnels.

image
Datata1 commented 2 months ago

I am interested in finding a solution to this issue. I haven't found any solutions online, so perhaps this should be submitted as a feature request.

I found a Stack Overflow question asking if there is a URI scheme for tunnels: Stack Overflow question link.

If such a scheme exists, could we open that remote tunnel using vscode.openFolder() with that URI as an argument?

image

Simon-Count commented 2 months ago

@chrmarti or anyone from the remote tunnels team able to provide the parameter structure for these calls?