CoreLibs icon indicating copy to clipboard operation
CoreLibs copied to clipboard

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

Open Alex-302 opened this issue 1 year ago • 0 comments

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

  • ||pagead2.googlesyndication.com^$app=/altergames\.recreverse$|altergames\.[ic].*/ to match altergames.intellect_battle, altergames.carlauncher, altergames.recreverse
  • ||pagead2.googlesyndication.com^$app=/altergames\.[a-z0-9_]+/ to match all apps from altergames publisher.

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

Alex-302 avatar Aug 22 '24 14:08 Alex-302