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

Explanation of the state of uBlock Origin (and other blockers) for Safari #158

Open
ghost opened this issue Sep 8, 2019 · 138 comments
Open

Comments

@ghost
Copy link

ghost commented Sep 8, 2019

Very quick tl;dr: uBO will no longer work with Safari, use Firefox or a new "content blocker" app (see below for good replacements).

In the past few months, and especially in the past week, there have been a lot of posts and comments questioning the status of uBlock Origin for Safari. This should answer all questions on the status of uBO for safari.

uBlock Origin was ported for Safari in 2016, and was updated regulary (mostly changes from the main project) until 2018 when development completley stopped. Since then Apple has begun phasing out Safari extensions as extensions, and has instead been implenting a new extensions framework which is extremley limited in adblocking functions, only allowing "content blockers", which are just links bundled as an app which Safari enforces. From Safari 12 / macOS Mojave, old legacy Safari extensions were still allowed, but came with warnings saying that they will slow down your browsing (they infact won't, or at least not noticably). Safari also recently shut their Extension Gallery, instead redirecting it to the mac app store. Though it is still curently possible to install uBlock Origin by downloading the extension from Github (edit: must follow these instructions, it will not be starting from Safari 13 / macOS Catalina, when the legacy entension API will be fully deprecated.

It will not possible for uBlock Origin to work with the upcoming Safari 13 / macOS Catalina release
If you are a current user of uBlock Origin for Safari here are the options to continue blocking ads:

  1. For the moment continue to use Safari 12 with uBlockOrigin. Anybody with uBO currently installed, it won't be removed until you update to Safari 13. If you don't have uBO installed, and wish to install on a pre-Catalina version of Safari, Download the latest (and final) release here and follow these instructions to install it. Unfortunately it's a bit complicated. This will stop working with macOS Catalina (coming "this fall"). Update: It appears that it is not possible to install uBO permanently, it will always uninstall on a restart of Safari. If you have it, it should stay.
  2. Switch to a different browser. If you choose this, I strongly recomend Firefox. Chrome will itself be ending support for uBlockOrigin soon. If battery life is an issue for you get Firefox Beta, Nightly or Developer which has massive battery life improvements to bring it on par with Safari / Chrome being tested (note: somewhat unstable). This will come to the stable version, hopefully in time for uBO-Safari's eol.
  3. Get a content blocker. Not nearly as powerful as uBO, but the best option if you want to stay with Safari. Do not get the app called "uBlock", this is unassociated with uBlockOrigin (read about the split here), and is simply a content blocker with a big negative feature of having acceptable ads built in (which is AdBlockPlus's pay-to-play ad and tracker unblocking program). It shares no code with uBO and has no advantages over any other content blocking app. Here are some recomendations of content blockers:

Top picks

Other Good Options

  • Ghostery Lite. Free. Ghostery. Some advanced options for whitelisting. Good lists for ad and tracker blocking.
  • Adguard for Mac. Fully featured system wide adblocker, contains custom lists and element picker. Does cost after a trial, see here for prices.
  • Wipr. $1.99, simple featureless and popular. Don't see any advantage in this over Ka-block (see above) for an extra $1.99. Apparently Ka-Block doesn't work for youtube (wipr does), and Wipr uses 3 extensions to get around the limit in rules.

Do Not Reccomend

  • AdBlock Plus for Safari - Supports acceptable ads, a pay-to-play ad allowing system which allows certain ads and trackers which meet guidelines and pay AdBlock Plus. Some of these ads, imo, are not acceptable, and I don't consider any trackers acceptable. Uses Easylist so otherwise is identical to Ka-Block!.
  • uBlock - Don't at all associated with uBO or the code which uBO contains. Is instead identical to AdBlock Plus in all but name including acceptable ads.
  • AdBlock for Safari (made by BETAFISH INC) - Yet another acceptable ads-supporting blocker which just uses easylist. Avoid.
  • There are plenty more on the mac app store, have a look if none of these suit. No new content blockers can spy on you as they send lists though Safari's built in system, so they are all pretty safe. If you find a good one comment and I'll add it to this list.

Update: Here is a statement from gorhill (uBO developer) on the state of Safari

Edit: a lot people are asking about uBlock Origin not working in the future on Chrome. If you'd like more information on this, here is an article from ghacks from january, and a statement from gorhill, developer of uBlock.**

There has been discussion of this on Reddit Github and Hacker News.

@dpkonofa
Copy link

What differentiates an "ad-blocker" from a "content-blocker" that makes it impossible for this change? Isn't an "ad-blocker" just a "content-blocker" that only blocks a very specific type of content?

@Tongzhao9417
Copy link

thanks for u summation. it's so sad:( i have used it for three years and it's time to say goodbye...

@ghost
Copy link
Author

ghost commented Sep 20, 2019

What differentiates an "ad-blocker" from a "content-blocker" that makes it impossible for this change? Isn't an "ad-blocker" just a "content-blocker" that only blocks a very specific type of content?

I must admit the the terminology isn't very clear. A Safari "content-blocker" app sends a list to Safari, and Safari blocks it. A regular blocker (like uBO) blocks content itself. Safari content blockers aren't all bad, they are more secure in that they can't possibly collect your browsing history (not that uBO does), but lack the level of customisation and power that a regular blocker like uBO can provide.

@nheeren
Copy link

nheeren commented Sep 20, 2019

Thanks! You should pin this issue.

@ghost
Copy link
Author

ghost commented Sep 20, 2019

Thanks! You should pin this issue.

only @el1t can do that

@Rjevski
Copy link

Rjevski commented Sep 20, 2019

Just FIY I would not recommend buying 1Blocker. I paid both for the initial version and the "1Blocker X" one on IOS but I had the constant feeling the filter lists weren't being updated and I wasn't sure of their origin (I'm assuming they use EasyList for the ads, but which one do they use for privacy & annoyances?).

AdGuard for Safari is free, open-source and is compatible with uBlock-style filter lists (it has code that does its best to convert them to Safari content blocking lists). You can choose to use EasyList, EasyPrivacy, Fanboy's lists or any of the regional lists so I would recommend it over 1Blocker.

@ameshkov
Copy link

ameshkov commented Sep 20, 2019

Adguard for Safari, the most effective, but contains electron (chromium). I'm not entirely sure how it works, but it will cost performance and battery life on your computer so I would avoid it.

  1. Electron is used for the UI part of it only. All other parts are native.
  2. Running the electron part in the background is not necessary. Although, it is recommended so that AG could update filters automatically.
  3. The linked issue was resolved in the latest release

I'm not entirely sure how it works

You can take a look - https://github.com/AdguardTeam/AdGuardForSafari

@ghost
Copy link
Author

ghost commented Sep 20, 2019

Adguard for Safari, the most effective, but contains electron (chromium). I'm not entirely sure how it works, but it will cost performance and battery life on your computer so I would avoid it.

1. Electron is used for the UI part of it only. All other parts are native.

2. Running the electron part in the background is not necessary. Although, it is recommended so that AG could update filters automatically.

3. The linked issue was [resolved](https://github.com/AdguardTeam/AdGuardForSafari/issues/210) in the latest release

I'm not entirely sure how it works

You can take a look - https://github.com/AdguardTeam/AdGuardForSafari

Thank you for responding. Ive updated the post and corrected my errors.

Based on point 2, for filters to update, the electron part needs to be running. Does leaving this running for filters to update have any serious power or performance issues?

@ghost
Copy link
Author

ghost commented Sep 20, 2019

Just FIY I would not recommend buying 1Blocker. I paid both for the initial version and the "1Blocker X" one on IOS but I had the constant feeling the filter lists weren't being updated and I wasn't sure of their origin (I'm assuming they use EasyList for the ads, but which one do they use for privacy & annoyances?).

AdGuard for Safari is free, open-source and is compatible with uBlock-style filter lists (it has code that does its best to convert them to Safari content blocking lists). You can choose to use EasyList, EasyPrivacy, Fanboy's lists or any of the regional lists so I would recommend it over 1Blocker.

thats odd, when I wrote this post, everything I could find had it as the best or one of the best. This guy tested them quite thoroughly from 2015 to 2018, and found 1Blocker to stand out. Looking at it again now, it seems that 1Blocker requires an app update to update their lists (entirely based on the changelog), which would explain the slow rate of updates. Tommorow I will investigate further and update my list once again.

@ameshkov
Copy link

ameshkov commented Sep 20, 2019

Based on point 2, for filters to update, the electron part needs to be running. Does leaving this running for filters to update have any serious power or performance issues?

Not really. Here's how it looks on my MBP, and in my case, I am actually actively using it, not just keep it in the background:

There was indeed an issue with the version of Electron we were using previously, but it's now gone.

On the other hand, I share your sentiments about Electron. The UI is generally worse and slower than it could be if we made it native. But it allowed reusing a lot of existing code from the Chrome/FF extensions so here we are.

@freediverx
Copy link

freediverx commented Sep 20, 2019 via email

@freediverx
Copy link

freediverx commented Sep 20, 2019 via email

@benjamingr
Copy link

What about building uBlockOrigin as either a proxy with a root certificate or using applescript and making it a Mac app?

@vassudanagunta
Copy link

Further options are being discussed in #145.

@vassudanagunta
Copy link

@p4t44, you may want to link to the HackerNews discussion of the whys and pros and cons of Apple's change to Safari: https://news.ycombinator.com/item?id=21025252

@ghost
Copy link
Author

ghost commented Sep 20, 2019

Based on point 2, for filters to update, the electron part needs to be running. Does leaving this running for filters to update have any serious power or performance issues?

Not really. Here's how it looks on my MBP, and in my case, I am actually actively using it, not just keep it in the background:

There was indeed an issue with the version of Electron we were using previously, but it's now gone.

On the other hand, I share your sentiments about Electron. The UI is generally worse and slower than it could be if we made it native. But it allowed reusing a lot of existing code from the Chrome/FF extensions so here we are.

As AdGuard's performance is far from settled, I've linked here. If it goes fast for you, use it. If it goes slow for you, don't use and delete it.

@xtian
Copy link

xtian commented Sep 20, 2019

Just FYI for anyone reading this thread: AdGuard for Mac requires installing a kernel extension which as far as I know none of the other options do. I didn't feel comfortable with that so I went with one of the other options.

@El-Fitz
Copy link

El-Fitz commented Sep 21, 2019

I would also suggest Little Snitch or some free equivalent, using block lists. Since it's a firewall, it won't be impacted by any changes in Safari.

@CrazyPython
Copy link

I was using a manually installed build of uBlock Origin on Safari, but Safari crashed twice, and uBlock was dissabled.

@kfur
Copy link

kfur commented Sep 21, 2019

@p4t44 @freediverx Do you need nifty macos app or just good ad blocker ?
You don't need to run it. Electron app i needed only for rule updates. It can't slow down your safari browser. So i think slowness of this app it's not critical issue. You can run it from time to time just for update rules.

@kfur
Copy link

kfur commented Sep 21, 2019

@El-Fitz but functionality of this ad blocker will be limited to blocking hosts when real ad blockers much more powerful and it will diffidently slow down your browser. Better use dnscrypt-proxy with blocklist in this case if you could satisfied by host blockers.

@ameshkov
Copy link

@p4t44

As AdGuard's performance is far from settled, I've linked here. If it goes fast for you, use it. If it goes slow for you, don't use and delete it.

Why? It seems settled that the UI is slow as it's Electron-based, and I don't argue with that. It just has nothing to do with ad blocking performance, and there's no one on this thread complaining about that. Also, "slow" does not mean that it consumes additional energy or whatever. It simply takes more time to render when you decide to use it.

@cosmarc
Copy link

cosmarc commented Sep 21, 2019

Just wanted to leave this here: https://thehackernews.com/2019/09/browser-chrome-extension-adblock.html

@ghost
Copy link
Author

ghost commented Sep 21, 2019

@p4t44

As AdGuard's performance is far from settled, I've linked here. If it goes fast for you, use it. If it goes slow for you, don't use and delete it.

Why? It seems settled that the UI is slow as it's Electron-based, and I don't argue with that. It just has nothing to do with ad blocking performance, and there's no one on this thread complaining about that. Also, "slow" does not mean that it consumes additional energy or whatever. It simply takes more time to render when you decide to use it.

It used to be that it was slower even without the UI open before a recent update. It is also reccomended that you leave the app open constantly for filters to update (which or may not slow it down). I can link you to a dozen reports of AdGuard going slow, so I think it is unreasonable not to mention it in the list.

Slow means that 1) it takes longer to use, 2) uses excessive CPU and memory to make the rest of your computer go slower and 3) use more battery. I'm really not sure wether it is significantly slower then alternatives, and I don't have the time or will to figure it out. I've linked to this thread so anybody unsure can read the comments of the AdGuard developer and decide for himself.

I think that if you are considering AdGuard, download it. Check activity monitor, if it takes up a lot of CPU or battery, uninstall and get something else. If it doesn't, then don't and use it.

@Sangeppato
Copy link

Sangeppato commented Sep 21, 2019

I would just like to mention a couple of advantages that Wipr has over Ka-Block:

  • Wipr works with YouTube, while Ka-Block doesn't
  • Wipr is actually made of 3 extensions in order to be able to overcome the 50k rules limitation imposed by Apple, so it can go up to 150k and block more stuff (Ka-Block can fail to block ads on some websites in my experience)
  • I don't know if Ka-Block can do this, but Wipr can automatically update the filter list in background without having the app up and running all the time.

Note that with the new Content Block API you don't need to have a white-list option built into the extension, because you can exclude content blocking on specific websites directly from Safari going to Preferences -> Websites -> Content Blockers

@superlex
Copy link

superlex commented Nov 22, 2020

@possiblerobot

  1. Open AG for Safari
  2. Update your filters
  3. Close AG for Safari

No app in background needed, no resource used :)

@possiblerobot
Copy link

@superlex That's not a bad strategy, for sure. But computers are supposed to take care of boring/annoying background tasks for us. Opening AG once or twice a day to update lists is exactly what we should not have to do. But maybe in a week, that's what I'll be doing too. Haha.

At least Safari 14 took a step in the right direction with standard (mostly) WebExtensions. I still have hope.

@superlex
Copy link

@possiblerobot
Yep, you're right.. We need a simple script in order to update automatically filters.

@dwiehoff
Copy link

dwiehoff commented Feb 11, 2021

Switch to a different browser.

From what I can tell, only Safari supports using AirPlay with embedded videos. Is there a way to stream videos via AirPlay within Chrome or Firefox?

@muHashh
Copy link

muHashh commented Feb 25, 2021

So what's the recommended one for M1 macs?

@elesto
Copy link

elesto commented Feb 25, 2021

Honestly I gave up trying to mess with safari and I switched to firefox and ubo. Been happy ever since.

@cristian-rivera
Copy link

Honestly I gave up trying to mess with safari and I switched to firefox and ubo. Been happy ever since.

Agreed, the ability to customize, low resource usage and overall security/privacy settings made Firefox a no-brainer for me.

@praveenperera
Copy link

Honestly I gave up trying to mess with safari and I switched to firefox and ubo. Been happy ever since.

Agreed, the ability to customize, low resource usage and overall security/privacy settings made Firefox a no-brainer for me.

Unfortunately Safari is still king when it comes to battery usage

@fdenzer
Copy link

fdenzer commented Mar 1, 2021

If

  • the websites don't work
    (Safari is the new IE9 to web devs like myself: hard to test against and so much of niche, that a "install a different, mainstream browser" nag screen is getting my preferred solution. But of course, some users don't even know what a browser is and on mobile devices you can not change away from Apples Rendering Engine.)

  • and/or I am forced to watch ads,

then I do lose more battery, than by using FF+μBO.

@BOTKooper
Copy link

If

  • the websites don't work
    (Safari is the new IE9 to web devs like myself: hard to test against and so much of niche, that a "install a different, mainstream browser" nag screen is getting my preferred solution. But of course, some users don't even know what a browser is and on mobile devices you can not change away from Apples Rendering Engine.)
  • and/or I am forced to watch ads,

then I do lose more battery, than by using FF+μBO.

Well, it works just fine, and if you wanna show "install a different browser" to 50% mobile internet, god bless you do not.
Rendering is actually a point, sure. Yeah, it's strange sometimes, but what else we could get from so closed (from communication point) company. Nothing restricts you from committing to webkit though.

For me the only features missing there is multi-profile like in Chrome for differing personal and work accounts and support for ordinary extensions like uBlock, but for that I have Chrome installed.

@vprelovac
Copy link

vprelovac commented Mar 30, 2021

Just as a heads up, Orion (macOS browser, WebKit fork) has native support for uBlock Origin and many other web extensions. We are currently in private beta and accepting new testers.

@vassudanagunta
Copy link

vassudanagunta commented Mar 30, 2021

@vprelovac

Just as a heads up, Orion (macOS browser, WebKit fork) has native support for uBlock Origin and many other web extensions. We are currently in private beta and accepting new testers.

I put it on HN for you: https://news.ycombinator.com/item?id=26631598

@strafe
Copy link

strafe commented Jun 5, 2021

@vprelovac will you be accepting some applications soonish?

@vprelovac
Copy link

vprelovac commented Jun 5, 2021

Current waitlist time for Orion is about 2-3 weeks.

@ujeshkrishnan
Copy link

The Safari support for WebExtensions was released in 2021 and is available from Safari 14 (shipped with macOS Big Sur). WebExtensions for Safari are published in the App Store. See documentation here.

Any hope for uBlock back in Safari?

@gwarser
Copy link

gwarser commented Jul 18, 2021

@ujeshkrishnan https://www.reddit.com/r/uBlockOrigin/comments/nura67/ubo_on_ios_soon/

@chinmaythosar
Copy link

Curious if on macOS NetworkExtensions can be used to make a DoT / DoH app (I made one for iOS a while back) which then has lists from ublock (or rather any list) that is added to blacklist for the app such that any DNS request is then blocked. With M1 Macs I feel that searching through anything around 50,000 blacklists won't be much of a problem. Not sure if this approach was discussed anywhere else.

Note : In case anyone is wondering using System DNS in Network Extensions for macOS 11 and iOS 14 will override any DNS from apps. This is because apps can decide to use their own encrypted DNS in iOS 14 / macOS 11 in which case your local DNS blockers will not work.

@dronezzzko
Copy link

dronezzzko commented Sep 13, 2021

@chinmaythosar there're two options (both worked for me):

@ink-splatters
Copy link

AdGuard is SLOOOOOOOOW. Horrible piece of software. Typical of garbage created with Electron.

well, I don't agree it's garbage, it's pretty decent in terms of it does the thing well, but it's painfully slow. And Electron is garbage, of course

@vassudanagunta
Copy link

Has anyone tried using alternative open source router firmware, such as Tomato and its forks such as FreshTomato, that supports blocking at the router?

From what I can tell, this is achieved via a router-based DNS that "blocks all ads and trash websites via the DNS cache poisoning method". I don't know if other open source router firmware offers other methods.

For Tomato and its forks:

In addition, FreshTomato has a built-in ad blocker that I guess is easier to manage than custom scripts:

FreshTomato's ad blocker works through DNS cache poisoning. It downloads lists of URLs/domains to block. It then replaces whatever dnsmasq resolves as the advertiser's correct IP address with an address of 0.0.0.0.

FreshTomato's built-in ad blocker is separate from the ad blocking scripts seen on the Web pasted into FreshTomato's custom script window

@strafe
Copy link

strafe commented Jan 12, 2022

Has anyone tried using alternative open source router firmware, such as Tomato and its forks such as FreshTomato, that supports blocking at the router?

Yes with OpenWRT. It's not as convenient as blocking at the browser though as exceptions take longer to input and can't be temporarily added with a single click. Best for devices that don't support system-wide blocking, e.g. iOS.

@Chasapple4
Copy link

Would the Chromium MV3 style work with the new Safari extension model?

@emikaadeo-git
Copy link

emikaadeo-git commented Sep 20, 2022

Is there are some plans to make a port of new experimental uBOLite MV3 API-based content blocker to Safari?
Safari have support for MV3 extensions since version 15.4 https://webkit.org/blog/12445/new-webkit-features-in-safari-15-4/#safari-web-extensions
EDIT:
Looks like currently it's not possible:
uBlockOrigin/uBlock-issues#1444 (comment)

@vprelovac
Copy link

Just a heads up that full (or nearly full) uBO experience is possible in a WebKit-based browser. Orion browser, a WebKit-based Mac browser (still in beta) supports Chrome/Firefox extensions natively.

https://browser.kagi.com

@ankitsharma07
Copy link

I have been using Orion and it's been great so far.

@sdykae
Copy link

sdykae commented Jan 24, 2023

My god orion did it 😫

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests