AdguardTeam / CoreLibs

Core Adguard libraries
https://adguard.com/
Apache License 2.0
40 stars 7 forks source link

Improve `$app` modifier - add wildcard or regexp support #1906

Open Alex-302 opened 3 months ago

Alex-302 commented 3 months ago

Issue Details

This is relevant to AdGuard for Android. There are cases when a publisher has dozens of apps, and we need to list all these apps to block ads or to not apply a rule for these apps.

For example, in this case we need to list 6 apps, there are cases where there are many more apps.

altergames.intellect_battle
altergames.carlauncher
altergames.strong_link
altergames.recreverse
altergames.recreverse_fortwo
altergames.neurodraw

Proposed solution

Add wildcard or regexp support for rules with package_name for AdGuard for Android.

||pagead2.googlesyndication.com^$app=altergames.*|com.app2

or like $domain modifier with regexp https://adguard.com/kb/general/ad-filtering/create-own-filters/#domain-modifier

This will allow the rule to be applied to new applications that we were not aware of at the time the rule was added, and will help with some popular ads.

Alternative solution

No response