The Wayback Machine - https://web.archive.org/web/20200919014120/https://github.com/AdguardTeam/AdGuardForSafari/issues/93
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Too Many Filters (Almost) by Default #93

Closed
ghost opened this issue Dec 6, 2018 · 18 comments
Closed

Too Many Filters (Almost) by Default #93

ghost opened this issue Dec 6, 2018 · 18 comments
Assignees
Milestone

Comments

@ghost
Copy link

@ghost ghost commented Dec 6, 2018

Steps to reproduce

  1. Update to AdGuard 1.1.0
  2. In Preferences → General, ensure Use Optimised Filters is On
  3. In Filters, enable Ad Blocking (AdGuard Base only) + Privacy (AdGuard Spyware only) + Security (Malware Domains, Spam404, and NoCoin Filter List)
  4. Update the filters

Expected behavior

AdGuard should enable the filters it can use and let me know what filters cannot be enabled and why.

AdGuard should suggest a sane default configuration comprised of optimal filters for ad-blocking and/or security. If users cannot enable ad blocking and security at the same time, then AdGuard should explain why and let them choose.

Actual behavior

AdGuard complains that I have gone over the 50 000 Filters limit, even though I only used obvious toggles to enable filters that any user of a Safari Content Blocker can legitimately be interested in.

It is one thing for AdGuard to give users options, but it is quite another to encourage users to shoot themselves in the foot. The current toggle-based system encourages users to enable everything for maximum protection, and forces them into a wall.

It is currently not clear what the best or default configuration is or should be. This leaves users un-checking filters at random until they get below 50 000, without any real sense of whether they are making progress towards a secure configuration.

Your environment

  • AdGuard for Safari version: 1.1.0
  • Environment name and version: Safari 12.0.2 (14606.3.4)
  • Operating System: macOS Mojave 10.14.2 (18C54)

Edited to reply to @ameshkov’s question.

@ameshkov
Copy link
Member

@ameshkov ameshkov commented Dec 6, 2018

Which filters have you enabled under "Security"?

@ameshkov ameshkov added this to the 1.2 milestone Dec 6, 2018
@ghost
Copy link
Author

@ghost ghost commented Dec 6, 2018

@ameshkov For the purposes of this example, all three, namely Malware Domains, Spam404, and NoCoin Filter List, all of which seem reasonable from the standpoint of a user desirous of protecting their privacy and security.

@ameshkov
Copy link
Member

@ameshkov ameshkov commented Dec 6, 2018

Generally, the only way to partly solve this 50k issue is to have multiple content blocker extensions in Safari. The problem with this approach is that filters inside different content blockers cannot affect each other (which is sometimes necessary).

So we'll have to do some weird stuff:

  1. Add multiple content blocking extensions to Safari:
  • General (for Ad blocking, Language-specific filters and Other)
  • Spyware
  • Social Widgets and Annoyances
  • Security
  • Other (for Custom and any other category if we ever add it)
  1. Rules from the user filter and whitelist will be added to ALL content blockers
@Mizzick
Copy link
Contributor

@Mizzick Mizzick commented Dec 6, 2018

hmm, this sounds interesting

@ghost
Copy link
Author

@ghost ghost commented Dec 6, 2018

I believe one of the key issues is that it is currently very difficult to understand what should be enabled.

For example, in the Other category, there is a filter whose description states…

Special filter for Safari 9+ on iOS and Mac OS. We need a separate filter for Safari browser because it does not fully support our rules syntax.

If AdGuard “needs a separate filter for Safari,” then what are all the other filters doing? The description implies that anything but this filter is incompatible with Safari and seems to make every other filter in the app useless. Yet, this “made-for-Safari” filter, which ships in an app called “AdGuard for Safari” is hidden in the “Other” section…

It is also difficult for anyone not intimately familiar with the various lists to know what extent, if any, they are liable to overlap. For example, AdGuard Annoyances filter and Fanboy's Annoyances no doubt contain different rules, but to what extent is one better than the other?

Regarding your comment above, I believe this is what the popular 1Blocker extension does on iOS, and it seems to be working very well on that platform. I do not know to what extent it could be translated to macOS, since 1Blocker for macOS is more or less dead in the water, but it seems the approach has been battle-tested in theory at least.

@ameshkov
Copy link
Member

@ameshkov ameshkov commented Dec 6, 2018

This approach will work indeed, we've implemented it already on iOS (it's in the inner test at the moment).

However, most of the filters maintainers don't care about Safari and its limitations, and that's why we should be careful.

Regarding the Safari filter, it was supposed to resolve issues caused by Safari content blocking API limitations. Tbh, it is obsolete and will be removed in the future.

@ameshkov
Copy link
Member

@ameshkov ameshkov commented Dec 7, 2018

@Mizzick we'll need to prepare the Safari converter for that.

The task is complicated so it's postponed to 1.3 (at least).

@maciboy
Copy link

@maciboy maciboy commented Dec 19, 2018

@ameshkov
There is something strange about the number of filters:
On iOS (iPhone and iPad) I have 6 lists activated, which make up 48.944 filter rules.

Within AdGuard for Safari I now enabled the IDENTICAL lists (even one less, since I don’t need the 'AdGuard Mobile Ad filter' on my Mac).
However, the extension keeps telling me, that I’m exceeding the 50k limit?!
I have to enable the 'optimize filter' option to avoid the warning! (What does this option do to avoid the exceeding?)

How can this be that iOS says rules are below 50k and Mac says above?
Btw: It would be great if - like in the iOS version - the extension shows the number of currently activated filter rules :)

@ameshkov ameshkov modified the milestones: 1.3, 1.4 Feb 18, 2019
@ameshkov
Copy link
Member

@ameshkov ameshkov commented Feb 18, 2019

Moved to 1.4, v1.3 is all about advanced blocking rules: #114

@superlex
Copy link

@superlex superlex commented Feb 21, 2019

@maciboy
Lists for Safari on iOS and Safari on macOS are different, e.g.
https://filters.adtidy.org/extension/safari/filters/2.txt
https://filters.adtidy.org/ios/filters/2.txt
Basically, lists for iOS don't contain advanced rules (ext-css, script, etc), so they are smaller.

@F3000
Copy link

@F3000 F3000 commented Apr 23, 2019

Is here some progress ?

@zzebrum
Copy link

@zzebrum zzebrum commented Apr 23, 2019

@F3000 the issue is assigned to the v1.4

@F3000
Copy link

@F3000 F3000 commented Apr 23, 2019

Willl you implemented it like suggested ?

@ameshkov
Copy link
Member

@ameshkov ameshkov commented Apr 24, 2019

Yes, but later, we're working on v1.3 release right now

@F3000
Copy link

@F3000 F3000 commented Apr 24, 2019

Ok . Have you a new state for iOS beta which will include the different plugins ?

@Beribis
Copy link

@Beribis Beribis commented Apr 28, 2019

@ameshkov Audrey it's not 100% clear to me, please could you confirm if 1.4 will support >50,000 filters?

The thread seems slightly ambiguous in that it might refer to "resolving differences between iOS & macOS"
or
"resolving the 50,000 filter ceiling"

You see right now users of uBlock-Origin cannot proceed on Safari Technical Preview 80 and are therefore forced to change to alternative adblockers. Since most uBlock-Origin users typically require more than 50k filters, AdGuard is effectively out of the running, save for that critical (comment you made regarding v1.4 which I might have misunderstood). In the meantime, several users have already migrated to a number of platforms and are starting to report back.

Keep it up, very impressive work here!

@superlex
Copy link

@superlex superlex commented Apr 29, 2019

@Beribis

"resolving the 50,000 filter ceiling"

I guess this one, by adding multiple content blocking extensions to Safari (supposedly, 50k rules limitation will refer to each extension). See #93 (comment) .

resolving differences between iOS & macOS

only ragards multiple content blocking extensions support

This approach will work indeed, we've implemented it already on iOS (it's in the inner test at the moment)
(#93 (comment))

For now the issue is assigned to the v1.4 .

PS:
I like uBlock Origin too, but it never had 50k rules limitation because it never supported Safari content blocking API. In addition, AdGuard supports filters optimization, so even if you use the same number of lists you will have fewer rules.

@1176
Copy link

@1176 1176 commented Jun 11, 2019

Well , I have deactivated everything but 1 filter which its ad blocking and still says "too many filters"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.