mirror of
https://github.com/fosrl/newt.git
synced 2026-02-08 05:56:40 +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
|
||||
if dockerEnforceNetworkValidationBool {
|
||||
if dockerSocket != "" && dockerEnforceNetworkValidationBool {
|
||||
logger.Info("Enforcing docker network validation")
|
||||
|
||||
isWithinNewtNetwork, err := docker.IsWithinHostNetwork(dockerSocket, dockerContainerAsHostnameBool, targetAddress, targetPort)
|
||||
|
||||
Reference in New Issue
Block a user