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.
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