-
Notifications
You must be signed in to change notification settings - Fork 887
CLI: UDP port forwarding does not work with IPv6 #14529
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
Comments
This is intentionally not supported for UDP due to technical reasons. For TCP this is supported as the process is straightforward: we dial However, for UDP, there is no concept of a connection, so we cannot determine whether the IPv4 attempt failed. When implementing the TCP fallback, I considered several potential solutions for UDP but decided against all of them:
Instead, I recommend changing your app to listen on the IPv4 loopback or using a UDP proxy, such as |
@RobinKa when port forwarding, there are two different listeners. There is a local listener, opened as part of the As @deansheather mentioned, our Agent, running in the remote workspace, only forwards UDP packets to IPv4 on the local loopback. There isn't much we can really do without a bunch of extra config. So, we don't plan on changing that behavior in the near term at least. Hopefully you can configure the remote listening app to listen on IPv4. For the local listener, |
I'm going to close out this issue as we have merged fixes for IPv6 listening on the local side. On the workspace side, we recommend |
UDP port forwarding doesn't seem to work with IPv6. I verified it does work with IPv4.
Reproduction steps (e.g. with https://gist.github.com/tuxmartin/e64d2132061ffef7e031 and modified to work with Python3 by changing the prints and MESSAGE to have
b
prefix)coder port-forward <workspace> --udp 5005
AF_INET6
andUDP_IP=::1
orlocalhost
: doesn't work (with Wireshark I can see it's using IPv6)AF_INET
andUDP_IP=127.0.0.1
orlocalhost
: works (with Wireshark I can see it's using IPv4)The text was updated successfully, but these errors were encountered: