Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Improve custom DNS hosts file parsing #3103

Closed
wants to merge 1 commit into from

Conversation

NickRF
Copy link

@NickRF NickRF commented Aug 10, 2024

What does this PR aim to accomplish?:

Improve parsing of custom DNS hosts file. This is useful when directly importing an existing hosts file in to pihole, which may contain comments or variable whitespace.

This allows entries with variable whitespace to appear in the web interface.

How does this PR accomplish the above?:

Modify parsing code to allow variable whitespace, and exclude comments

Link documentation PRs if any are needed to support this PR:

n/a


By submitting this pull request, I confirm the following:

  1. I have read and understood the contributors guide, as well as this entire template. I understand which branch to base my commits and Pull Requests against.
  2. I have commented my proposed changes within the code and I have tested my changes.
  3. I am willing to help maintain this change if there are issues with it later.
  4. It is compatible with the EUPL 1.2 license
  5. I have squashed any insignificant commits. (git rebase)
  6. I have checked that another pull request for this purpose does not exist.
  7. I have considered, and confirmed that this submission will be valuable to others.
  8. I accept that this submission may not be used, and the pull request closed at the will of the maintainer.
  9. I give this submission freely, and claim no ownership to its content.

  • I have read the above and my PR is ready for review. Check this box to confirm

Handle variable whitespace and comments in the custom DNS hosts file.

Also, correctly fill the "domains" field in getCustomDNSEntries output.

Signed-off-by: Nick Forrington <nick.forrington@gmail.com>
@yubiuser
Copy link
Member

Thanks for your PR. We are in the middle of the development-v6 > development merge for the upcoming Pi-hole v6. Please base and target your PR on the v6 branch.

@NickRF NickRF changed the base branch from master to development-v6 August 10, 2024 23:18
@NickRF NickRF changed the base branch from development-v6 to master August 10, 2024 23:32
@NickRF NickRF changed the base branch from master to devel August 10, 2024 23:33
@NickRF
Copy link
Author

NickRF commented Aug 11, 2024

This change isn't relevant to the development-v6 branch.

@NickRF NickRF closed this Aug 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants