Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support reverse tunnel #100222

Open
shawee opened this issue Jun 15, 2020 · 7 comments
Open

Support reverse tunnel #100222

shawee opened this issue Jun 15, 2020 · 7 comments
Assignees
Labels
feature-request Request for new features or functionality remote-explorer Remote explorer view
Milestone

Comments

@shawee
Copy link

shawee commented Jun 15, 2020

context

I am trying to access adb in local machine from my remote server. To do that, I tried something like
ssh -R ${remote_port}:localhost:${local_port} remote_address which opened a reverse port forwarding from my server and local machine so that I was able to access local attached devices in my remote server terminal.
However, rather than using remote ssh tunnel everytime, I want to automate everything in vscode extension

Problem

It looks reverse port is a known issue. Wondering when that will be resolved? (https://code.visualstudio.com/api/advanced-topics/remote-extensions#known-issues)

I tried to use vscode.workspace.openTunnel
(https://raw.githubusercontent.com/microsoft/vscode/master/src/vs/vscode.proposed.d.ts)
api but it only supports a forward tunnel. Can we support reverse tunnel in this api?

@alexr00 alexr00 added feature-request Request for new features or functionality remote-explorer Remote explorer view labels Jun 16, 2020
@alexr00 alexr00 added this to the Backlog Candidates milestone Jun 16, 2020
@markm77
Copy link

markm77 commented Jun 26, 2020

Reverse tunnels are also super useful for forwarding API calls and redirects received by a web server in test scenarios etc. I often create an "empty" web server with just security stuff and an Apache reverse proxy and use a reverse tunnel to route traffic back to my dev machine to allow running of an integration test suite.

Would be great to be able to set up and manage this reverse forwarding in VS Code 😀.

My usual command is

ssh -N -o 'ExitOnForwardFailure yes' -R 8080:localhost:8080 -R 3000:localhost:3000 user@server

for reverse tunnelling.

@arita37
Copy link

arita37 commented Jul 31, 2020

Most of secure server requires :
Bastion Login
Reverse SSH Tunnel

@0Grit
Copy link

0Grit commented Oct 14, 2021

Hoping this can solve my problem of connecting GDB client in the remote workspace to GDB server running on my local machine.

@chuanqisun
Copy link

This could potentially resolve microsoft/WSL#5211 and microsoft/WSL#4619

@jberenhaus
Copy link

Bumping this issue, we have a keen interest for this feature as we do Android development (adb) through remote servers.

As I mentioned in microsoft/vscode-remote-release#7182

Right now we launch an external ssh process to do the tunneling which is less than ideal but kind of works. Having a solid API that's part of VS Code would be much more reliable and would save us a bunch of dev time.

Is there an update on priority for this issue?

@Starmania
Copy link

Oh, so I'm non the only guy to try to use adbd on local ?

@jarrodcolburn
Copy link

jarrodcolburn commented Dec 12, 2023

Would love this!

What I have to do for adb is pretty backwards. Which is either:
ngrok (for TCP)
serveo (ssh->sshd<-ssh).

Seems very roundabout when VS Code's UI and Framework are already communicating.

What I think OP, and I, are trying to accomplish is...
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Request for new features or functionality remote-explorer Remote explorer view
Projects
None yet
Development

No branches or pull requests

10 participants