mirror of
https://github.com/fosrl/newt.git
synced 2026-03-05 02:06:44 +00:00
Add extra pre-condition check for enforcing docker network
This commit is contained in:
2
main.go
2
main.go
@@ -830,7 +830,7 @@ func updateTargets(pm *proxy.ProxyManager, action string, tunnelIP string, proto
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Add the new target
|
// Add the new target
|
||||||
if dockerEnforceNetworkValidationBool {
|
if dockerSocket != "" && dockerEnforceNetworkValidationBool {
|
||||||
logger.Info("Enforcing docker network validation")
|
logger.Info("Enforcing docker network validation")
|
||||||
|
|
||||||
isWithinNewtNetwork, err := docker.IsWithinHostNetwork(dockerSocket, dockerContainerAsHostnameBool, targetAddress, targetPort)
|
isWithinNewtNetwork, err := docker.IsWithinHostNetwork(dockerSocket, dockerContainerAsHostnameBool, targetAddress, targetPort)
|
||||||
|
|||||||
Reference in New Issue
Block a user