Add extra pre-condition check for enforcing docker network

This commit is contained in:
Jonny Booker
2025-06-10 12:58:37 +01:00
parent e335bb8a1f
commit cbbd5b0c76

View File

@@ -830,7 +830,7 @@ func updateTargets(pm *proxy.ProxyManager, action string, tunnelIP string, proto
}
// Add the new target
if dockerEnforceNetworkValidationBool {
if dockerSocket != "" && dockerEnforceNetworkValidationBool {
logger.Info("Enforcing docker network validation")
isWithinNewtNetwork, err := docker.IsWithinHostNetwork(dockerSocket, dockerContainerAsHostnameBool, targetAddress, targetPort)