Skip to content

Sort dynamic filter list by destination / host components #1055

@Mathnerd314

Description

@Mathnerd314

Prerequisites

  • I verified that this is not a filter issue
  • This is not a support issue or a question
  • I performed a cursory search of the issue tracker to avoid opening a duplicate issue
    • Your issue may already be reported.
  • I tried to reproduce the issue when...
    • uBlock Origin is the only extension
    • uBlock Origin with default lists/settings
    • using a new, unmodified browser profile
  • I am running the latest version of uBlock Origin
  • I checked the documentation to understand that the issue I report is not a normal behavior

Description

I can't speak for anyone else's dynamic rule list, but in my list most rules are sub-hosts where the destination is specific to the origin, and the rest are CDN's like jsdelivr. Sorting by destination allows finding the CDN's, while the current sort (by origin) does not seem to aid anything besides erasing a site.

Also, for subdomains, the current sort is just alphanumeric. It should group domains like a.x.com and b.x.com, to aid in creating rules for the top domain.

A specific URL where the issue occurs

Chase.com is a big site that provides an example. To allow it to work in uBlock Medium Mode (+ a global rule blocking inline/first-party scripts) I've created the following rules:

personal.chase.com chase.com * noop
...
secure04b.chase.com chase.com * noop
secure04b.chase.com chasecdn.com * noop
secure06b.chase.com chase.com * noop
secure06b.chase.com chasecdn.com * noop
secure07b.chase.com chase.com * noop
secure07b.chase.com chasecdn.com * noop
...
www.chase.com chase.com * noop
www.chase.com chasecdn.com * noop

Clearly there is a lot of duplication here. Without sorting it by the destination, or at least by hostname components in the source, these are all scattered throughout the filter list. And if I see the secure* hosts and add rules for the top domains,

chase.com chase.com * noop
chase.com chasecdn.com * noop

Then there is no warning or anything that will remove the now-useless other rules like for personal.chase.com.

Another case is domains like cdn.jsdelivr.net.cdn.cloudflare.net, because they are used on many completely unrelated websites. You wouldn't be able to find the shared CDN's for possible whitelisting without a good memory or the requested sort.

Steps to Reproduce

  1. Add a lot of dynamic filter rules
  2. Try to look at them and find redundancies

Expected behavior:

Sort by destination and source domains with an intelligent sort
or
Some extension of the filter tool to allow selecting a sort by destination

Actual behavior:

Give up in frustration and import the list into a spreadsheet program just to sort it

Your environment

  • uBlock Origin version: 1.27.4
  • Browser Name and version: Firefox 76
  • Operating System and version: Linux (NixOS 20.09)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestfixedissue has been addressed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions