### Prerequisites

by ADMIN 18 views

Prerequisites for Reporting AdGuard Home Issues

Before we dive into the issue at hand, it's essential to ensure that we've covered all the necessary ground. Here are the prerequisites for reporting AdGuard Home issues:

  • Check the Wiki and Discussions: Make sure to review the AdGuard Home Wiki and Discussions categories to see if your issue has already been addressed.
  • Search for Duplicate Issues: Verify that your issue isn't a duplicate of an existing one.
  • Report a Bug, Not a Question or Help Request: If you're experiencing a bug, report it. If you have a question or need help, use the Discussions category for assistance.
  • Set Up AdGuard Home Correctly: Ensure that you've installed and configured AdGuard Home correctly. If you need help with installation or configuration, use the Discussions category.

Platform (OS and CPU Architecture)

  • Linux, ARMv7: This issue is specific to the Linux, ARMv7 platform.

Installation

  • GitHub Releases or Script from README: The issue was encountered using the GitHub releases or script from the README.

Setup

  • One Machine: The issue was verified on one machine.

AdGuard Home Version

  • v0.107.59: The AdGuard Home version used when encountering the issue is v0.107.59.

Action

I'm encountering an issue with the Disallowed Domains feature (blocked_hosts) in AdGuard Home. When using AdBlock rules, any attempt to block domains results in all domains being dropped. For example, using ||*^ in blocked_hosts drops everything, and adding exceptions like @@||google.com^$important doesn't work. This would cause every single domain query to timeout and be dropped.

Similarly, if I use ||com^, all .com domains get dropped, and those queries time out as well. Other AdBlock-based rules also don't work, including regular expressions and anything else I tried, whether using the UI or AdGuardHome.yaml.

The only distinction it seems to make is between Prefix || which is a complete and utter drop of any expression following, which doesn't apply when using @@||, which is useless since without disallow/drop there is no relevance to overriding "allow."

This behavior is unexpected and not documented. I'm seeking a solution where only specified domains are allowed, while others are dropped without sending default blocked responses.

Steps to Reproduce

To reproduce the issue, follow these steps:

  1. Use ||*^ in blocked_hosts to block all domains.
  2. Add @@||google.com^$important as an exception.
  3. Observe that no domains are allowed.

Expected Result

The expected behavior is that exceptions should be respected, allowing specified domains to resolve.

Actual Result

The actual behavior is that all domains are dropped, regardless of exceptions.

Additional Information and/or Screenshots

The issue was verified on two separate Raspberry Pi 3B and an AdGuard Home Windows as a Service installation with various AdBlock-type rules, including regex, to no avail.

Solution

To resolve this issue, we need to ensure that the AdBlock syntax is correctly implemented in the blocked_hosts feature. This may involve updating the AdGuard Home code properly handle exceptions and allow specified domains to resolve.

Conclusion

In conclusion, the issue with the Disallowed Domains feature (blocked_hosts) in AdGuard Home is a critical one that needs to be addressed. By following the steps to reproduce the issue and understanding the expected and actual behavior, we can work towards a solution that allows specified domains to resolve while dropping others without sending default blocked responses.

Additional Resources

For more information on AdGuard Home and its features, please refer to the AdGuard Home Wiki and Discussions categories. If you have any further questions or concerns, feel free to reach out to the AdGuard Home community for assistance.

Related Issues

Contributing to AdGuard Home

If you're interested in contributing to AdGuard Home, please refer to the AdGuard Home Contributing Guide for more information on how to get started. Your contributions are invaluable in helping us improve AdGuard Home and provide a better experience for our users.

Q&A: AdGuard Home Disallowed Domains Feature

In this article, we'll address some of the frequently asked questions related to the AdGuard Home Disallowed Domains feature, specifically the blocked_hosts feature.

Q: What is the AdGuard Home Disallowed Domains feature?

A: The AdGuard Home Disallowed Domains feature, specifically the blocked_hosts feature, allows you to block specific domains from resolving. This feature is useful for blocking unwanted content, such as ads or trackers.

Q: What is the issue with the blocked_hosts feature?

A: The issue with the blocked_hosts feature is that when using AdBlock rules, any attempt to block domains results in all domains being dropped. This means that even if you try to add exceptions, such as @@||google.com^$important, they don't work, and all domains are blocked.

Q: Why is this behavior unexpected?

A: This behavior is unexpected because the AdBlock syntax is not correctly implemented in the blocked_hosts feature. Specifically, the feature does not properly handle exceptions and allow specified domains to resolve.

Q: What is the expected behavior?

A: The expected behavior is that exceptions should be respected, allowing specified domains to resolve. This means that if you try to block a domain using AdBlock rules, the feature should only block that specific domain and allow other domains to resolve.

Q: How can I resolve this issue?

A: To resolve this issue, we need to ensure that the AdBlock syntax is correctly implemented in the blocked_hosts feature. This may involve updating the AdGuard Home code to properly handle exceptions and allow specified domains to resolve.

Q: What are some common use cases for the blocked_hosts feature?

A: Some common use cases for the blocked_hosts feature include:

  • Blocking ads and trackers
  • Blocking specific websites or domains
  • Blocking content based on specific keywords or patterns

Q: How can I contribute to the AdGuard Home project?

A: If you're interested in contributing to the AdGuard Home project, please refer to the AdGuard Home Contributing Guide for more information on how to get started. Your contributions are invaluable in helping us improve AdGuard Home and provide a better experience for our users.

Q: Where can I find more information on AdGuard Home?

A: For more information on AdGuard Home and its features, please refer to the AdGuard Home Wiki and Discussions categories. If you have any further questions or concerns, feel free to reach out to the AdGuard Home community for assistance.

Q: What are some related issues that I should be aware of?

A: Some related issues that you should be aware of include:

Conclusion

In conclusion, the AdGuard Home Disallowed Domains feature, specifically the blocked_hosts feature, is a powerful tool for blocking unwanted content. However, the issue with the feature is that it does not properly handle exceptions and allow specified domains to resolve. By understanding the expected behavior and contributing to the AdGuard Home project, we can work towards a solution that allows specified domains to resolve while dropping others without sending default blocked responses.