Readit News logoReadit News
InfiniteVortex commented on WBlock: A New Ad-Blocker for Safari   github.com/0xCUB3/wBlock... · Posted by u/InfiniteVortex
InfiniteVortex · 4 months ago
wBlock is a new ad-blocker for Safari. It supports (in general) everything Wipr, AdGuard for Safari/iOS, uBlock Origin Lite can do except for maybe multi-device sync
InfiniteVortex commented on WebShield – A new wide-spectrum content blocker for Safari   github.com/arjpar/WebShie... · Posted by u/tW4r
jamesy0ung · a year ago
Are you using anything new in iOS 17?

It would be nice to be able to run it on my iPhone which is stuck on 16.2 because of TrollStore and Dopamine

InfiniteVortex · a year ago
I can't use anything below iOS 17 because I use SwiftData, probably some other newer APIs too. Sorry.
InfiniteVortex commented on WebShield – A new wide-spectrum content blocker for Safari   github.com/arjpar/WebShie... · Posted by u/tW4r
crossroadsguy · a year ago
Will it also show up as multiple extensions (like it does for AdGuard) if I want to use more than 1 type of blocking/lists? (I am aware that it is Apple's artificially forced limitation but thought I will still ask and whether you folks have found a way around it)
InfiniteVortex · a year ago
WebShield shows up as multiple extensions, 1 content blocker for each category, and 1 for advanced blocking (a webextension). This is because each content blocker, I believe IIRC, has a limit of 150k rules.
InfiniteVortex commented on WebShield – A new wide-spectrum content blocker for Safari   github.com/arjpar/WebShie... · Posted by u/tW4r
radicality · a year ago
I’m using it too for now, but considering stopping. afaik the tool is not open source (even if it is, still happy to pay for the app), and to me feels a bit too magical and makes me uneasy. I have no idea what it’s downloading, what lists it’s fetching, what kind of content it’s blocking, what it’s blocking on a specific site, whether some site is broken because of it, or even if it’s working at all. I do like how in ublock (or brave), it shows some info like number of things blocked on current site. And then in ublock you can go arbitrarily deep into logs / custom blocking etc.
InfiniteVortex · a year ago
For Wipr 2, on macOS you can see the rules here: `~/Library/Group Containers/group.wipr2.rules/Rules/` in the JSON files. Kaylee (Wipr dev) sources the blocker list data from these [0] sources.

[0]: https://kaylees.site/wipr-acknowledgements.html

InfiniteVortex commented on WebShield – A new wide-spectrum content blocker for Safari   github.com/arjpar/WebShie... · Posted by u/tW4r
twilo · a year ago
Is this similar to wBlock?
InfiniteVortex · a year ago
Yes! Me and 0xCube created WebShield & wBlock respectively in parallel in close collaboration with each other. They're pretty much sister projects. I do think since I create more free time for myself, WebShield has (some) more features - just off the top of my head: iOS/iPadOS/visionOS support. wBlock does currently have an auto updater for filter lists when you open the app though, which WebShield doesn't have, but I'm working on it!
InfiniteVortex commented on WebShield – A new wide-spectrum content blocker for Safari   github.com/arjpar/WebShie... · Posted by u/tW4r
layer8 · a year ago
That’s a very technical description. The Safari extensions I use already do block YouTube ads. So it’s unclear what WebShield brings to the table in practical terms over existing extensions.
InfiniteVortex · a year ago
Well, WebShield is free & open source, those extensions may or may not. It's also a single app/codebase across macOS/iOS/iPadOS/visionOS. If you're happy with your current ad blocking setup for Safari, continue using it. I'm not trying to conquer the world.
InfiniteVortex commented on WebShield – A new wide-spectrum content blocker for Safari   github.com/arjpar/WebShie... · Posted by u/tW4r
TingPing · a year ago
To set a baseline: Ad blockers work by a combination of static rulesets and dynamic javascript.

Safari does not support the ruleset format of Chrome/Firefox, so a ruleset has to be maintained for it specifically. In practice this is always the AdGuard ruleset. I doubt a single adblocker doesn't use this as a base.

Beyond that is the custom JS they inject. It's hard to say how good it is but that is the only selling point:

- https://github.com/arjpar/WebShield/tree/cae7629f1c5fb79fe76...

AdGuard has its own too:

- https://github.com/AdguardTeam/AdGuardForSafari/tree/master/... (JS files)

They look similar in a lot of ways, because well they have to, but I haven't done any deep analysis.

Safari extensions will never match uBlock Origin because it simply does not provide the same APIs (webRequest blocking and DNS) that Firefox does. The ruleset format is also more limited.

InfiniteVortex · a year ago
Safari ad blocker extensions will never be as powerful as uBlock Origin in terms of the sheer number or types of content they can block, but they can be as performant or efficient, or even more so. To my knowledge, uBlock Origin uses its own custom networking engine through webRequest, WebShield uses Safari's content blocking API which is baked into WebKit. When loading a content blocker in Safari (& thus WebKit) rules are converted into DFA in WebKit [0]. Pretty sure this is the code in WebKit [1]. Yes, the content blocking API is more limited than full blown adblock filter list syntax, meaning its not as powerful, but it is more performant & efficient than uBlock Origin, within the subset of rules that it supports. To complement the content blocking API we use scriptlet/extended css/css/js injection in advanced blocking, similar to AdGuard. The AdGuard guys probably know way more about the specifics of how content blocking works in WebKit than I do though. But I do know that the content blocking API in WebKit & Safari is more performant/efficient than uBlock Origin, subject to limitations on powerfulness in terms of the types and number of content that can be blocked as mentioned before.

I still feel like I need to performance test WebShield more to back my claims, so take it with a grain of salt, but based on what I've seen, it is comparable with or better than uBlock Origin in terms of performance/efficiency, not pure power, but again, please take it with a grain of salt, because I can't believe it.

[0]: https://en.wikipedia.org/wiki/Deterministic_finite_automaton [1]: https://github.com/WebKit/WebKit/tree/04edf7716a74170fb0967f...

InfiniteVortex commented on WebShield – A new wide-spectrum content blocker for Safari   github.com/arjpar/WebShie... · Posted by u/tW4r
sylens · a year ago
The bar they need to clear right now seems to be Wipr2
InfiniteVortex · a year ago
Wipr 2 is great! And so is the dev, with who I've talked to before. The difference between WebShield & Wipr 2 is WebShield allows you to specifically toggle on/off which lists you'd like, as well as add your own custom lists. Kaylee (Wipr dev) also has to maintain the lists herself (she sources a lot from other lists), so there is a bit of manual maintenance for her, because Wipr is meant to be an "install & forget" app for the most part. There are tradeoffs that come with this design, for example, all scriptlets (called injectables in Wipr), to my knowledge, are injected as as a content script, whereas WebShield is similar but we inject each scriptlet on demand, cache it (not sure if Wipr does caches too), ensure it doesn't re-inject on the same page (more testing needs to be done with this, and I'm not sure if Wipr 2 already checks for this). That's just off the top of my head.

With that said, Wipr 2 is great and very reliable. If you enjoy using it and it fits all your needs, you tried WebShield and didn't feel the need to switch, continue using Wipr! I'm not trying to conquer the world.

InfiniteVortex commented on WebShield – A new wide-spectrum content blocker for Safari   github.com/arjpar/WebShie... · Posted by u/tW4r
voisin · a year ago
Seems to feature a lot of AdGuard filter lists. Does this blocker differ materially from AdGuard?
InfiniteVortex · a year ago
Author here: No, not really. It uses AdGuard lists, SafariConverterLib by AdGuard for converting filter lists to Safari content blocking format. The only difference is that WebShield works on iOS, iPadOS, visionOS, and macOS as one app & codebase (AdGuard has separate apps for Safari on macOS & iOS), and its completely free & open source, albeit I accept donations, but nothing is behind a paywall, and will never be behind a paywall. I'd rather just stop developing than sell out to ad companies (acceptable ads) or put things behind a paywall.

u/InfiniteVortex

KarmaCake day101April 10, 2020View Original