-
Notifications
You must be signed in to change notification settings - Fork 302
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
Port forwarding should support IPv6 #7029
Comments
I can connect via ssh remote to ubuntu 22.04 server. Then I start in vsc terminal via npm run dev the node app. This will open ssh tunnel(s) with the particular port(s) and the button to open browser appears. But after this the browser will not receive any further data if the connection is done via IPv6. So either Vsc or Windows11 issue. Ubuntu server can curl the localhost and will display the browser data. |
@Rar9 did you get it to work? |
No for now I've disabled IPv6 localhost on server |
I had some dev containers that port forwarding was not working as expected when listening to localhost. After downgrading the remote and dev container extensions, I just noticed that the application was listening to the IPv6 loopback address ( Steps to reproduce the issue:
You see a message of vscode telling that the port is auto forwarded, but there's no response in the forwarded address. Also, there's a message in the "Shared" output about the forwarding:
Starting a server to the IPv4 loopback works as expected ( |
Devcontainers on windows don't seem to route connections to the IPv6 localhost (microsoft/vscode-remote-release#7029), and recent Debian seems to interpret "localhost" as IPv6.
This makes working with Vite + Devcontainers broken out of the box See vitejs/vite#16522 (comment) for workarounds |
…e#7029 by using IPv4 loopback when in Remote Container environment
1.70.0
Microsoft Windows [Version 10.0.19043.1826]
Ubuntu 20.04.4 LTS
Containers
N/A
Steps to Reproduce:
clone the project & open with vscode
Reopen in Container
Here is the
PORTS
info.Connect to
localhost
locally usingsqlcmd
sqlcmd -S localhost -U sa -P P@ssw0rd -Q "SELECT 1;"
It will result:
Connect to
127.0.0.1
locally usingsqlcmd
sqlcmd -S 127.0.0.1 -U sa -P P@ssw0rd -Q "SELECT 1;"
It will run successfully.
I really expected I can connect to the
db
container usinglocalhost
. It because thePORTS
shows that.During few hours research, I realized that Windows use IPv6 by default. When VSCode use IPv4 to do the port forwarding, connect to
localhost
will route to::1
and it will failed.Two suggestions:
Change the
Local Address
to show127.0.01:1433
on thePORTS
window.Port forwarding support
IPv6
.The text was updated successfully, but these errors were encountered: