Skip to content

pihole v6 over HTTPS support#4

Open
sntxrr wants to merge 3 commits intojaxxstorm:mainfrom
sntxrr:https
Open

pihole v6 over HTTPS support#4
sntxrr wants to merge 3 commits intojaxxstorm:mainfrom
sntxrr:https

Conversation

@sntxrr
Copy link

@sntxrr sntxrr commented Sep 26, 2025

Rough thoughts about HTTPS support for Pihole v6

Might need to make the ignore TLS self-signed optional for folks with real DNS implementations


Important

Adds Pi-hole support as a DNS provider with optional TLS verification for self-signed certificates in DNSScale.

  • Behavior:
    • Adds Pi-hole as a supported DNS provider in cmd.go, config.go, and main.go.
    • Introduces pihole-tls-insecure-skip-verify flag to optionally skip TLS verification for self-signed certificates.
  • Providers:
    • Implements PiholeProvider in providers/pihole.go to manage DNS records via Pi-hole API.
    • Supports A and AAAA records, with optional TLS verification.
  • Configuration:
    • Updates cmd.go to include Pi-hole specific flags and environment variables.
    • Modifies config.go to add PiholeConfig struct for Pi-hole settings.
  • Misc:
    • Adds LICENSE file with MIT License.
    • Updates README.md to reflect Pi-hole support and license information.

This description was created by Ellipsis for 6ab0074. You can customize this summary. It will automatically update as commits are pushed.

jaxxstorm and others added 3 commits September 26, 2025 10:07
Signed-off-by: Lee Briggs <lee@leebriggs.co.uk>
Signed-off-by: Lee Briggs <lee@leebriggs.co.uk>
@sntxrr sntxrr changed the title Https pihole v6 over HTTPS support Sep 26, 2025
Copy link

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Changes requested ❌

Reviewed everything up to 6ab0074 in 1 minute and 41 seconds. Click for details.
  • Reviewed 464 lines of code in 6 files
  • Skipped 0 files when reviewing.
  • Skipped posting 6 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. LICENSE:21
  • Draft comment:
    Missing newline at EOF; consider adding one for POSIX compliance.
  • Reason this comment was not posted:
    Decided after close inspection that this draft comment was likely wrong and/or not actionable: usefulness confidence = 10% vs. threshold = 50% While POSIX compliance for newlines at EOF is a real thing, this is a LICENSE file that's being added. The missing newline won't affect functionality. Many tools automatically handle this. It's a very minor style issue that doesn't warrant a comment, especially on a standard license file. The POSIX standard does recommend newlines at EOF, and some tools might have issues without it. Could this cause problems with license scanning tools? Even if some tools prefer newlines at EOF, most modern tools handle files without them just fine. The content and validity of the MIT license is not affected. Delete this comment as it's too minor of an issue to warrant attention, especially for a standard license file.
2. cmd.go:50
  • Draft comment:
    Include 'pihole' in dns-provider flag and ensure documentation and examples are updated.
  • Reason this comment was not posted:
    Comment looked like it was already resolved.
3. cmd.go:58
  • Draft comment:
    New Pi-hole flags added; verify that the bool flag 'pihole-tls-insecure-skip-verify' is correctly handled and documented.
  • Reason this comment was not posted:
    Comment did not seem useful. Confidence is useful = 0% <= threshold 50% The comment is asking the author to verify that a new flag is correctly handled and documented. This falls under asking the author to ensure something is done, which is against the rules. The comment does not provide a specific suggestion or point out a specific issue with the code.
4. providers/pihole.go:41
  • Draft comment:
    Confirm that trimming the trailing slash from baseURL is acceptable for all Pi-hole deployments.
  • Reason this comment was not posted:
    Comment did not seem useful. Confidence is useful = 0% <= threshold 50% The comment is asking the PR author to confirm their intention regarding a specific change, which violates the rule against asking for confirmation of intention. It does not provide a specific code suggestion or ask for a test to be written.
5. providers/pihole.go:169
  • Draft comment:
    If multiple duplicate records exist, consider deleting all matches instead of breaking after the first deletion.
  • Reason this comment was not posted:
    Decided after close inspection that this draft comment was likely wrong and/or not actionable: usefulness confidence = 20% vs. threshold = 50% This is a valid concern - if multiple records with the same name and type exist, we're only deleting the first one. However, in DNS systems, having multiple identical records is usually an invalid state. The code is handling the common case correctly. Without knowing the Pi-hole API details, we can't be certain if multiple duplicates are even possible. I may be underestimating the importance of handling duplicate records. If the Pi-hole API allows duplicates, leaving them could cause issues. While handling duplicates could be more robust, suggesting a change without clear evidence that duplicates are possible or problematic violates the rule about making speculative comments. Delete the comment since it's speculative without clear evidence that duplicate records are possible or problematic in Pi-hole's DNS implementation.
6. cmd.go:204
  • Draft comment:
    The comment here uses "PiHole" while elsewhere it uses "Pi-hole". Consider using a consistent naming convention for clarity.
  • Reason this comment was not posted:
    Decided after close inspection that this draft comment was likely wrong and/or not actionable: usefulness confidence = 10% vs. threshold = 50% While the comment is technically correct about the inconsistency, it's a very minor documentation issue that doesn't affect functionality. The code itself uses the hyphenated form consistently in all variable names and config keys. This is just about a comment style preference. According to our rules, we should not make purely informative comments or comments about obvious/unimportant issues. The inconsistency could potentially confuse users when they're searching documentation or error messages. Consistent naming in documentation is a best practice. While documentation consistency is good, this is an extremely minor issue that doesn't impact usability or code quality. The official product name "Pi-hole" is used correctly in all user-facing elements like flags and config keys. Delete this comment as it's too minor of an issue and doesn't require code changes. It's just about documentation style.

Workflow ID: wflow_9AszNBG9JKxQ6V1Q

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

return fmt.Errorf("dns.cloudflare.api_token is required when using cloudflare provider")
}
case "pihole":
if c.DNS.Pihole.BaseURL == "" {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider validating that 'pihole.base_url' is a properly formatted URL (e.g., starts with http:// or https://).

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