chkdomain icon indicating copy to clipboard operation
chkdomain copied to clipboard

Add Dnsguard

Open LaxrFar opened this issue 1 month ago • 6 comments

PR Type

Enhancement


Description

  • Added DNSGuard public DNS server to adblock DNS list

  • Updated blocked domain detection to include DNSGuard's block response IP


Diagram Walkthrough

flowchart LR
  A["adblockDNS array"] --> B["Added dnsguard.pub entry"]
  C["query() function"] --> D["Added DNSGuard block IP detection"]

File Walkthrough

Relevant files
Enhancement
chkdm
Add DNSGuard DNS server and block detection                           

chkdm

  • Added dnsguard.pub DNS server (62.192.153.242) to the adblockDNS
    associative array
  • Added DNSGuard's blocked domain response IP (62.192.153.243) to the
    query() function's blocked domain detection logic
  • Minor formatting adjustment with additional newline
+5/-1     

Summary by CodeRabbit

  • New Features

    • Added DNSGuard as an ad-blocking DNS option.
    • Expanded query blocking to include DNSGuard endpoints, improving coverage against ads and trackers.
  • Chores

    • Minor formatting and cleanup around updated logic.

LaxrFar avatar Oct 13 '25 08:10 LaxrFar

Summary of Changes

Hello @LaxrFar, I'm Gemini Code Assist[^1]! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request introduces support for Dnsguard, a new ad-blocking DNS service. It expands the available ad-blocking DNS options by including Dnsguard's primary server and incorporates its blocked domain IP address into the system's domain resolution query logic, allowing for more comprehensive ad and malicious domain blocking.

Highlights

  • New DNS Provider: Added 'dnsguard.pub' with the IP address '62.192.153.242' to the list of available ad-blocking DNS providers.
  • DNS Query Logic Update: Integrated Dnsguard's blocked domain IP '62.192.153.243' into the query function, enhancing the system's ability to identify blocked domains from this new provider.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with :thumbsup: and :thumbsdown: on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

[^1]: Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

gemini-code-assist[bot] avatar Oct 13 '25 08:10 gemini-code-assist[bot]

[!NOTE]

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

📝 Walkthrough

Walkthrough

Added DNSGuard to adblock DNS configuration and query-blocking logic by introducing new DNS entries and a case branch handling DNSGuard’s blocked IP, along with minor formatting updates.

Changes

Cohort / File(s) Summary
Adblock DNS configuration
chkdm
Added adblockDNS entry for DNSGuard: dnsguard.pub → 62.192.153.242.
Query blocking logic
chkdm
Extended blocked-domain handling to include DNSGuard with blocked IP 62.192.153.243; adjusted case branch termination to use ;& and added a DNSGuard comment; minor whitespace/formatting tweaks.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant C as Client
  participant R as Resolver (chkdm)
  participant S as Upstream DNS

  rect rgba(224,240,255,0.5)
    note over R: Query handling with extended blocked-domain logic
    C->>R: DNS query
    alt Domain matches blocked list
      opt New branch
        note right of R: DNSGuard branch (62.192.153.243)
      end
      R-->>C: Blocked response (per matched provider)
    else Not blocked
      R->>S: Forward query
      S-->>R: DNS answer
      R-->>C: Response
    end
  end

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
Title Check ✅ Passed The title succinctly reflects the primary change by indicating that DNSGuard support was added, which aligns directly with the added adblock DNS entry and updated blocking logic.
✨ Finishing touches
  • [ ] 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • [ ] Create PR with unit tests
  • [ ] Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

coderabbitai[bot] avatar Oct 13 '25 08:10 coderabbitai[bot]

PR Compliance Guide 🔍

Below is a summary of compliance checks for this PR:

Security Compliance
🟢
No security concerns identified No security vulnerabilities detected by AI analysis. Human verification advised for critical code.
Ticket Compliance
🎫 No ticket provided
  • [ ] Create ticket/issue
Codebase Duplication Compliance
Codebase context is not defined

Follow the guide to enable codebase context checks.

Custom Compliance
No custom compliance provided

Follow the guide to enable custom compliance check.

Compliance status legend 🟢 - Fully Compliant
🟡 - Partial Compliant
🔴 - Not Compliant
⚪ - Requires Further Human Verification
🏷️ - Compliance label

PR Code Suggestions ✨

No code suggestions found for the PR.

@LaxrFar would you like to revise based on the reviews?

PeterDaveHello avatar Oct 17 '25 19:10 PeterDaveHello

Yes

LaxrFar avatar Oct 17 '25 21:10 LaxrFar