rancher-sandbox / rancher-desktop

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

Scan /proc/net/{tcp,udp} for host network driver port bindings #7746

Closed Nino-K closed 3 days ago

Nino-K commented 2 weeks ago

This introduces a scanner that monitors entries in /proc/net/{tcp,udp}. When using the host network driver (--net=host) in Docker or containerd, some port bindings are not exposed through the API. However, these bindings are still visible in /proc/net because the container shares the host network namespace.

The procnet scanner scans the corresponding files every 3 seconds and if a new entry is found or removed it calls the host switch API to expose and unexpose accordingly.

Fixes: https://github.com/rancher-sandbox/rancher-desktop/issues/7378

jandubois commented 2 weeks ago

Can you fix the spelling errors (by adding the words to the dictionary)? That should re-trigger the actions...