blink icon indicating copy to clipboard operation
blink copied to clipboard

Ability to preconfigure `code` to automatically create ssh tunnel

Open rrgeorge opened this issue 4 years ago • 3 comments

Currently, I don’t find the way code works with anything other VSCode web to be a very good user experience. Especially when connecting to a self-hosted instance of code-server. The need to open an ssh tunnel, then open another tab, and the need to specify the url to the forwarded are all cumbersome. I would like to see an option in settings to preconfigure the url to use for code, as well as the option to preconfigure an ssh tunnel for it to use. So that simply running code /path/to/file would handle the entire process. Many apps provide similar “transparent ssh tunnel” functionality, Screens being one example.

rrgeorge avatar Feb 25 '22 18:02 rrgeorge

We are waiting entitlement from Apple to allow all domains.

It seems to take way longer than we expected. So I'm thinking about extending code command with -L flag, that will open tunnel if needed.

So, for instance code -L 3000 host will expand into

  1. ssh -L 3000:localhost::3000 host
  2. code http://localhost:3000

yury avatar Feb 28 '22 07:02 yury

We are waiting entitlement from Apple to allow all domains.

It seems to take way longer than we expected. So I'm thinking about extending code command with -L flag, that will open tunnel if needed.

I understand that restriction.

So, for instance code -L 3000 host will expand into

  1. ssh -L 3000:localhost::3000 host
  2. code http://localhost:3000

While that's simpler, I would still like to be able to streamline this so we can configure code to always use a specific setup by default

rrgeorge avatar Feb 28 '22 08:02 rrgeorge

i agree. perhaps in the host options there is a code section that you can configure port forwarding. would make that much easier since i will always use ssh tunneling for using code

myneid avatar Mar 04 '22 16:03 myneid