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

Custom HTML file for "blocked page" #7280

Open
3 tasks done
JustLeska opened this issue Sep 22, 2024 · 0 comments
Open
3 tasks done

Custom HTML file for "blocked page" #7280

JustLeska opened this issue Sep 22, 2024 · 0 comments

Comments

@JustLeska
Copy link

Prerequisites

  • I have checked the Wiki and Discussions and found no answer

  • I have searched other issues and found no duplicates

  • I want to request a feature or enhancement and not ask a question

The problem

Hi there,

I would like to request a feature for AdGuard Home that allows users to specify a directory for custom HTML and CSS files, which AdGuard Home can directly serve as the blocked page. This would eliminate the need to set up a custom IP address or external server for hosting the blocked page.

Currently, AdGuard Home allows users to specify a custom IP address for the blocked page. However, I think it would be more convenient if users could simply place their custom HTML and CSS files in a designated directory within AdGuard Home, and AdGuard Home would then serve these files as the blocked page.

Proposed solution

Custom Directory in AdGuard Home: Add a feature where users can upload or place their HTML and CSS files into a specific directory within the AdGuard Home installation (e.g., /custom_blocked_page).

Automatic Serving: When a domain is blocked, AdGuard Home will check for files in this directory and serve them as the custom blocked page instead of requiring an external IP or server.

HTML and CSS Support: The directory would support:

HTML files for the structure of the blocked page.
CSS files for custom styling.
Optionally, JavaScript files for additional functionality.

Fallback: The user will be able to choose between:

  • Default: Respond with zero IP address (0.0.0.0 for A; :: for AAAA) when blocked by Adblock-style rule; respond with the IP address specified in the rule when blocked by /etc/hosts-style rule
  • REFUSED: Respond with REFUSED code
  • NXDOMAIN: Respond with NXDOMAIN code
  • Null IP: Respond with zero IP address (0.0.0.0 for A; :: for AAAA)
  • Custom IP: Respond with a manually set IP address
  • Something like: Custom HTML/CSS page: Respond with a manually set HTML/CSS page from the /opt/AdGuardHome/CustomPage directory

Alternatives considered and additional information

This feature could be made optional for users who prefer the default blocked page or who already use a custom IP address for this purpose. By providing a built-in directory for custom HTML and CSS, AdGuard Home would become more user-friendly and I think this feature will simply my life because I am too lazy to create the webserver myself -_-.

Thank you for considering this feature request!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant