rancher-sandbox / rancher-desktop

Container Management and Kubernetes on the Desktop
https://rancherdesktop.io
Apache License 2.0
6.01k stars 283 forks source link

Support for UDP ports? #7473

Closed KallynGowdy closed 1 month ago

KallynGowdy commented 2 years ago

It appears that this agent currently only support setting up forwards for TCP listeners. Would it be possible to detect and support UDP ports as well?

The iptables lookup entries already include whether the port is TCP/UDP, so hopefully it is as simple as checking the flag and opening the listener in a different mode.

Thoughts?

jandubois commented 2 years ago

hopefully it is as simple as checking the flag and opening the listener in a different mode.

I don't think the network bridge between Windows and WSL support UDP port forwarding, but am not sure.

We'll eventually implement our own port forwarding code to also allow listening on external interfaces, and not just on localhost.

@Nino-K should have more details.

KallynGowdy commented 2 years ago

Yeah, it looks like this is a limitation of WSL. They've been using this issue as the basis point for several UDP-related problems, but it doesn't look like there's much activity on that issue specifically. There's a lot more discussion about supporting bridge networking with WSL (and even some support for it in the WSL Preview), but it is unclear what that would do for UDP networking or even if it is an acceptable solution.

jandubois commented 2 years ago

We have a plan to tunnel all traffic through a vsock so it looks like it originates from and terminates on the host, and not inside WSL2. That should also help with proxy settings and other problems, and we will be decoupled from whatever WSL2 is doing. But it will take a while to get implemented.

jandubois commented 1 month ago

Comments on #6821 seem to indicate that UDP has been working lately with WSL and the legacy networking stack (which is no longer supported as of Rancher Desktop 1.15).

@Nino-K I think this issue should be considered a duplicate of #6821 and closed.

Nino-K commented 1 month ago

I'm going to close this since it's a duplication of https://github.com/rancher-sandbox/rancher-desktop/issues/6821.