mageddo / dns-proxy-server

Solve your DNS hosts from your docker containers, then from your local configuration, then from internet
http://mageddo.github.io/dns-proxy-server/
Apache License 2.0
784 stars 78 forks source link

Enhancement: Return Host Machine IP when there is not an available IP #442

Closed mageddo closed 4 months ago

mageddo commented 5 months ago

What is expected

Change the feature "return host machine IP when there is not an available IP to answer" to not answer the Host Machine IP when it won't be possible to use that IP.

The feature is useful when

What is Happening

As mentioned at #429 there would be scenarios when disable that feature can be a better behavior, when:

Changes

The feature toggle as chosen as it give to client total power of decision of using or not that feature.

Create a feature toggle

A feature toggle to it turn off, turned on as default to maintain the backward compatibility.

Name: dockerSolverHostMachineFallback

~### Try to identify the wanted and unwanted scenario automatically~ Not prioritized for now

~If the container it's not in network mode = host and have not published ports then it makes no sense to answer the host IP address, do return no IP instead (NXDOMAIN).~