0

Currently I am accessing my VS code instance through it's remote feature. Sometimes it's SSH, sometimes K8s pod, sometimes remote Docker instance.

After I am able to attach VSCode to that remote instance, I can connect to some resources behind that instance ( Database, internal services... ). The configuration is like this

MyLocalPC -------------------------> RemoteVSServer -------------------------> Database

I can see that in VSCode there is a feature where ports on the [RemoveVSServer] can be forwarded to [MyLocalPC]

enter image description here

Here I can access RemoveVSServer:3000 from MyLocalPC:3000

My question is that is there any feature where I can access [Database]:9999 from [MyLocalPC]. By VSCode default or a plugin/extension/small application

qkhanhpro
  • 4,371
  • 2
  • 33
  • 45

1 Answers1

0

Finally I installed HAProxy on the instance that run VSCode Server

The HAProxy map remote port 9999 to VSCode Server's port 9999

From there I can do one more port-forward from VSCode Server's port 9999 to my local PC's port 9999

A simple config for HA Proxy can be found here

qkhanhpro
  • 4,371
  • 2
  • 33
  • 45