Live data from Hacker News

WebShield – A new wide-spectrum content blocker for Safari

github.com

41–50 of 78 posts

Re: WebShield – A new wide-spectrum content blocker for Safari

#41
post #6

The bar they need to clear right now seems to be Wipr2

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.

Re: WebShield – A new wide-spectrum content blocker for Safari

#42
post #18

It would be useful to describe what specifically this adds over existing Safari content blockers in that space.

Author here (I'm not OP): It converts filter lists to Safari's content blocking API using SafariConverterLib (by AdGuard) and stores advanced blocking (scriptlets, extended css, css & js) in a json file. The WebExtension then reads the json file through native messaging and injects the scriptlets, extended css, css & js. This means that things like YouTube ads can be blocked too, whereas using just the content blocki…

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.

Re: WebShield – A new wide-spectrum content blocker for Safari

#43

Can someone explain what "wide-spectrum content blocker" means and how it differs from other ad blockers available for Safari?

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 p…

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...

Re: WebShield – A new wide-spectrum content blocker for Safari

#44
post #42

Earlier quoted context omitted.

Author here (I'm not OP): It converts filter lists to Safari's content blocking API using SafariConverterLib (by AdGuard) and stores advanced blocking (scriptlets, extended css, css & js) in a json file. The WebExtension then reads the json file through native messaging and injects the scriptlets, extended css, css & js. This means that things like YouTube ads can be blocked too, whereas using just the content blocki…

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.

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.

Re: WebShield – A new wide-spectrum content blocker for Safari

#45
post #4

I like projects like this since Safari is probably the biggest competitor to Chrome, but historically Apple hasn't been kind to these sorts of extensions. I hope they're able to find a way to make it work, because Safari is well-integrated into the iOS ecosystem.

Since they dropped the old web extension support perhaps 10(?) years ago, the new extension system has only grown new capabilities. They even added the ability to dynamically execute JS, which is what enabled these blockers to do things like block YouTube ads.

Re: WebShield – A new wide-spectrum content blocker for Safari

#48
post #32
post #30

Earlier quoted context omitted.

I've been using AdGuard Pro happily on all my devices for about ten years now. I'm wondering what adding Ghostery to the mix does on Safari?

Ghostery doesn’t just hide consent banners and blocks tracking cookies, it also automatically opts-out from tracking consent. https://www.ghostery.com/blog/never-consent-by-ghostery#neve...

What trackers actually obey said consent?

Re: WebShield – A new wide-spectrum content blocker for Safari

#49
post #31

I have been using Wipr2, 100/100 on my adblock testing.

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.

Re: WebShield – A new wide-spectrum content blocker for Safari

#50
post #32
post #30

Earlier quoted context omitted.

I've been using AdGuard Pro happily on all my devices for about ten years now. I'm wondering what adding Ghostery to the mix does on Safari?

Ghostery doesn’t just hide consent banners and blocks tracking cookies, it also automatically opts-out from tracking consent. https://www.ghostery.com/blog/never-consent-by-ghostery#neve...

Ghostery is the thing you want to block in the first place.

https://web.archive.org/web/20130619042941/https://www.techn...

I see tracking consent opt-outs as pointless and misleading at best because the adtech industry doesn't operate in good faith. Just block them.

Post reply on HN