You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
defaultForwardedPorts differs from User forwarded Ports #9715
Remote Extension/Connection Type: Containers (on Remote Server)
When using a default forwarded Port, forwards containing a different host don't work.
In my example i got a container inside a docker network next to a minio container and a database container. These are accessible inside my application where i remote into via database:3306 or minio:9000. I now want to automatically forward these ports whenever i connect to the remote container and therefore defined it inside the .vscode/settings.json.
These entries don't work as expected and it fails to connect. However when i now remove the default forwarded ports and manually do the portforwarding through the interface (again using host:port), the services become available and function as it should be.
Steps to Reproduce:
Forward a port using settings.jsonremote.SSH.defaultForwardedPorts try to connect to container.
Remove said port forwards and do it manually, it works now.
In my opinion, the default ports should work exactly the same as the user forwarded ports.
Activity
alexr00 commentedon Dec 13, 2024
Looks like the wrong host is being used:
https://github.com/microsoft/vscode-remote-ssh/blob/e7c2543b21fd2d767c418e30015516608f916b13/open-ssh-remote/src/extension.ts#L356-L357