Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this implement/fix?
Rather recently, #2233 changed the response to
dig +short CHAOS TXT local.api.ftl
fromlocalhost
as hard-coded host name topi.hole
. However, on systems which do not use FTL as their DNS resolver, the later does actually not resolve. The initial trigger for said change was #2192 where a user described that they cannot use the API because they configured their web server to NOT listen on127.0.0.1
at all.The PR revisits the initial issue altogether and, instead of using any fixed host name, gets the actual IPs the webserver was bound to and reports this, e.g.
For ports not specified with specific IP, CivetWeb binds to the wildcard address (
0.0.0.0
). We substitute this with127.0.0.1
as not all clients behave well when0.0.0.0
is passed to them.Related issue or feature (if applicable): Fixes #2192. Fixes #2252
Pull request in docs with documentation (if applicable): N/A
By submitting this pull request, I confirm the following:
git rebase
)Checklist:
developmental
branch.