Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Support a catch all host which (almost) always matches the DNS request host #22

Closed
wants to merge 4 commits into from

Conversation

bridgeythegeek
Copy link

This PR adds support for a [[zones]] entry for host with name __CATCH_ALL which will always match a host name when tested.

  • The __CATCH_ALL answer is only provided if an exact match hasn't already been found in [[zones]] entries above the __CATCH_ALL entry in the toml file.
  • [[zones]] entries below the __CATCH_ALL entry may also match as well as the __CATCH_ALL.

Resolves #21.

Adam Bridge added 2 commits April 4, 2024 13:57
Adds support for a __CATCH_ALL host.
Copy link

codecov bot commented Apr 4, 2024

Codecov Report

Merging #22 (de88464) into main (a99dfe9) will decrease coverage by 2.53%.
The diff coverage is 57.14%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #22      +/-   ##
==========================================
- Coverage   97.54%   95.02%   -2.53%     
==========================================
  Files           4        5       +1     
  Lines         204      221      +17     
  Branches       37       42       +5     
==========================================
+ Hits          199      210      +11     
- Misses          3        7       +4     
- Partials        2        4       +2     
Files Coverage Δ
dnserver/main.py 94.44% <57.14%> (-4.68%) ⬇️

... and 1 file with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a99dfe9...de88464. Read the comment docs.

Adam Bridge added 2 commits April 4, 2024 14:07
Remove superfluous brackets
Remove whitespace
@yooo1999
Copy link

yooo1999 commented Dec 3, 2024

Why that PR didn't merge?

@yooo1999 yooo1999 mentioned this pull request Dec 3, 2024
@bridgeythegeek
Copy link
Author

Hi @yooo1999, I deleted the PR because, after thinking about it, I thought it was a bad idea. This project is actually a mature DNS server. A "catch all" is almost certainly "a hack" used for testing and there are already projects that exist for this purpose, for example FakeDns and fakedns (personally, I use FakeDns).

@yooo1999
Copy link

yooo1999 commented Dec 4, 2024

@bridgeythegeek I still think that good idea for that project
But ...as you think

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enhancement Request: Facilitate "Catch All"
2 participants