Skip to content

client: add per-client filter lists ui#8275

Open
fegauthier-paragon wants to merge 2 commits intoAdguardTeam:masterfrom
fegauthier-paragon:feat/per-client-filter-lists
Open

client: add per-client filter lists ui#8275
fegauthier-paragon wants to merge 2 commits intoAdguardTeam:masterfrom
fegauthier-paragon:feat/per-client-filter-lists

Conversation

@fegauthier-paragon
Copy link

Summary

This PR includes the backend changes from #8274 plus the frontend implementation.

Backend

  • Add UseOwnFilterLists, FilterListIDs, and AllowFilterListIDs fields to the client data model
  • Add per-client filter list filtering in matchHost()
  • Load all filters into the DNS engine regardless of global enabled state
  • Add YAML/JSON serialization and API support
  • Add unit tests

Frontend

  • Add a new "Filter lists" tab in the client settings modal, allowing admins to assign specific blocklists and allowlists per client
  • Add a "Use global filter lists" toggle: when on, the client uses global settings; when off, individual filters can be selected
  • Add "Select all" / "Deselect all" buttons for each section (blocklists and allowlists)
  • Use a two-column grid layout for filter entries
  • Add form ↔ API conversion: Record<string, boolean> in the form maps to number[] in the API
  • Add i18n keys for the new UI elements

Test plan

  • go test ./internal/filtering/... passes
  • go test ./internal/client/... passes
  • go test ./internal/home/... passes
  • npm run build-prod compiles successfully
  • ESLint and TypeScript checks pass
  • Open the client settings modal and verify the "Filter lists" tab appears
  • Verify "Use global filter lists" is ON by default for new clients
  • Toggle OFF and select specific filters, save, reopen and verify selections persist
  • Verify DNS queries are blocked/allowed according to per-client filter assignments
  • Verify user rules always apply regardless of per-client assignment

@windsurf-bot
Copy link

windsurf-bot bot commented Mar 2, 2026

I ran into an unexpected issue while reviewing this PR. Please try again later.

@fegauthier-paragon fegauthier-paragon force-pushed the feat/per-client-filter-lists branch from 4987902 to 76c3b08 Compare March 2, 2026 18:48
Add the ability to assign specific blocklists and allowlists to
individual clients.  When UseOwnFilterLists is true, only the
assigned filter lists apply to that client instead of the global
ones.  User rules (ID 0) always apply regardless of assignment.

All filters are now loaded into the engine even when globally
disabled, so that per-client assignments work for any filter.
Globally-disabled filters are excluded at match time for clients
using global settings.
Add a new "Filter lists" tab in the client settings modal allowing
admins to toggle specific blocklists and allowlists per client.
When "Use global filter lists" is off, individual filters can be
selected.  The layout uses a two-column grid for filter entries.
@fegauthier-paragon fegauthier-paragon force-pushed the feat/per-client-filter-lists branch from 76c3b08 to b3315da Compare March 2, 2026 18:53
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.

1 participant