uBlockOrigin / uMatrix-issues

This is the community-maintained issue tracker for uMatrix
https://github.com/gorhill/uMatrix
123 stars 17 forks source link

Support wildcards #290

Open dbfin opened 3 years ago

dbfin commented 3 years ago

Prerequisites

Description

First, I have seen a few issues concerning wildcards, but they all talk about allowing subdomains, while I encountered the need for a broader use of wildcards. The issue is that there is a website, call it example.com, that uses a (larger number) of scripts and assets from websites of the form example###.net, where ### stands for a number. The numbers are all 3-digits, and there seems no real boundary on how small or large they can be. On top of that I do not want to allow everything from these sites, just say "passive" resources such as css, media and images, so I would have to add thousands of rules.

An alternative solution that would however require the use of wildcards would be to simply add 3 lines of the form

example.com example*.net ... allow

Now, I understand that implementing wildcards in their generality would eventually lead to new kinds of problems. For example, if for a subdomain there are currently several rules, the most specific wins, where a rule for a subdomain is considered to be more specific than a rule for the upper-level domain. With wildcards, for example, if I have conflicting rules for say cdn..com and .example.com, then there is no obvious (at least at first) way to resolve the conflict for cdn.example.com.

But I was hoping, that given the above situation, someone could have a suggestion for my case specifically, or to the way of how indeed implement at least partial support for wildcards.

Thank you for your work!

A specific URL where the issue occurs

Steps to Reproduce

Try any wildcard rule -- they are not supported. Asterisks are interpreted literally.

Ruleset

Supporting evidence

Your environment