Skip to content
This repository was archived by the owner on Oct 16, 2020. It is now read-only.
This repository was archived by the owner on Oct 16, 2020. It is now read-only.

Chrome Manifest V3 discussion megathread #238

Open

Description

@mikhoul

Hi,

I really like Nano more than UBO but I was asking to myself what will be your direction if the proposal is adopted and that the actual API is neutered ?

My understanding is that Chrome (for me ) would become inferior to Firefox for adblockers (unless Firefox implement the same restriction which I doubt).

If the change happen they can happen in the next 12 months which is relatively fast so the solutions/alternatives I've see are:

  • Make an official version for Firefox and drop Chrome.
  • Make an Edge version with their new browser with blink engine IF they don't have the same restriction.
  • Submit to the new API and have an inefficient adblocker comparing to today.
  • Forking Chromium keeping the old API as it is today and have a version especially build for Nano.

Maybe there is other solutions that I don't foresee. 🤔

What is your take on this @jspenguin2017 ?

Activity

  1. jspenguin2017 commented on Jan 22, 2019

    @jspenguin2017
    Member

    I see 3 options:

    • Use the new API
    • Fork Chromium
    • Make a native app

    I'll explain in detail later.

    I would guess Edge will closely follow Chromium, so that's probably not going to work.
    What about Firefox? Well, I'll explain later.

  2. jspenguin2017 commented on Jan 22, 2019

    @jspenguin2017
    Member

    Option 1: Use the new API

    If the new API is really weak, then I don't think Firefox can survive for long. If websites can more easily get around the weak APIs of Chrome, then website owners will have a motivation to push everyone to use Chrome. And soon Chromium-based browsers will probably become the only usable browsers.

    If the new API is OK, then converting to the new API is probably going to be the easiest solution.

    The currently proposed APIs are on the weak side. If the 30k limit is lifted and rules can be dynamically modified, then I would say it's OK.

    In the other thread, gorhill listed his concerns:

    • Rules count limit
    • Dynamic filtering
    • The important option
    • The csp and inline-script options
    • Extended syntax

    The rules count limit is a legitimate concern (one of my two primary concerns mentioned above), as EasyList alone has more than 80k rules.

    As for dynamic filtering, I never use it. To be honest I don't even know how it works. So as far as I'm concerned, that's not an issue.

    When it comes to the important option, I think it's possible to implement with more than one extension. Each filter becomes an extension, one extension to enforce all important rules, and one master extension to help with whitelisting and management.
    Note that filters maintainers will probably have to publish their own filters as extensions then attach them to the public APIs of the coordinator. It's not going to be pretty, but theoretically possible.

    For the csp option, I think there'll be some way left to modify headers. If not, it can still be implemented using content scripts (script snippets). The inline-script option can be (AFAIK, is) implemented using csp.

    For extended syntax, these are a few notable ones:

    • Cosmetic filtering
    • Script snippets injection
    • Request redirection
    • The badfilter option
    • The important, csp, and inline-script options (covered above)

    For cosmetic filtering (normal and extended), pretty much everything is implemented in content scripts, which are not part of the manifest v3 proposal, so I would assume they are not going to change.

    The new APIs will actually make script snippets injection better, as the proposal contains new APIs that allow extensions to dynamically modify content scripts.

    Same thing for redirection, (the current draft of) declarativeNetRequest supports redirect rules natively.

    The badfilter option is resolved in compile time, so it doesn't matter.

    The only thing missing is RegExp rules (and HTML filtering if you want to count that). I don't think it'll be a problem because neither uAssets (nor me) really use RegExp rules. On the other hand, overly broad RegExp rules from EasyList are constantly causing problems.

  3. jspenguin2017 commented on Jan 22, 2019

    @jspenguin2017
    Member

    Option 2: Fork Chromium

    I would assume code for manifest v2 will eventually be removed, so the forking process will eventually become not a simple flag flip. Maintaining a browser fork is really difficult in general, and vulnerabilities can be opened if not careful.

    Another way is to use Electron to build a new browser. Unlike WebExtension, Electron provides really powerful APIs, which are unlikely to go away. However, the amount of work to maintain a browser is likely more than that of a fork, but since Electron apps use JavaScript and not native code, vulnerabilities are less likely to occur.

    Also, implementing WideVine (DRM) will be really difficult in either case.

  4. jspenguin2017 commented on Jan 22, 2019

    @jspenguin2017
    Member

    Option 3: Make a native app

    There's a shell there's a way. I'm sad to see that there's no open source native app that does more than DNS blocking.

    A native app is the best way to get around the constantly changing browser APIs, and as a bonus, it'll probably work for all browsers and even non-browser apps.

    I'm not sure how hard this will be though, last time I tried it didn't go so well.

  5. jspenguin2017 commented on Jan 22, 2019

    @jspenguin2017
    Member

    I probably will go with option 1 or 3. As for the timeline, I don't think it'll happen within 12 months. Right now, the APIs are not released yet, and the phase out period will likely take more than a year.

    I think it's a good time to get started on option 3, if things go wrong, option 1 can be used as fallback.

  6. mikhoul commented on Jan 22, 2019

    @mikhoul
    Author

    First thanks for your very detailed answer. 👍

    The problem I see with option 3 if my understanding is fine is that a native app would not be able to remove some objects like cosmetic filters are doing ?

    For me a native app sound like when I use AdAway on android, I'm pretty sure I'm missing something here about how would work a native app 🤔 ❓

    I would miss "Dynamic filtering" since I use it occasionally to un-break some filters that are good but that on specific website cause problems.

    I don't think Firefox will disappear, it can lose users but Google will always keep Firefox alive as a caution to prevent a split of their business by US Gov (like Microsoft have done with Apple).

    IMO if Google weaken their API for blocking ads it could revigorante Firefox with power-users and gain 2-3% of users. When I migrated from Firefox to Chromium I dragged with me ~150 users and those users today recommend Chrome/chromium to their friends and I'm pretty sure I'm not alone.

    But Mozilla management is crazy those day they removed so many things/features that I migrated to Chromium to stop from suffering from the many memory leaks in Firefox. So in one way it would not surprise me that they do some crazy thing in the future like following the very same Chrome API unless the management at Mozilla change.

    For the fork I was thinking it was more easy than you said it is to keep the old API, like some module you glue to the main code when you build chromium and that don't require lot of maintenance. I've seen Slimjet a Chromium fork and with an integrated ad-blocker so I was thinking it was "easy" to integrate in a fork.

    Time will tell. :octocat:

  7. jspenguin2017 commented on Jan 22, 2019

    @jspenguin2017
    Member

    native app would not be able to remove some objects like cosmetic filters are doing

    Again, there's a shell there's a way. Native apps are (theoretically) able to do cosmetic filtering on their own as they can patch everything the browser receives, however, I do agree that for cosmetic filtering, it's easier to implement using extensions.

    There's nothing stopping native apps from loading extensions into browsers, so if needed, the native app can have a companion extension.

    sound like when I use AdAway on android

    AdAway is a DNS manager, it is really limited in what it can do. I'm talking about native apps that can repack HTTPS requests.

    but Google will always keep Firefox alive as a caution to prevent a split of their business by US Gov

    Possibly.

    But Google can also point to those 20+ Chromium forks and say their code is under a permissive license, and everyone is free to fork and compete.

    For the fork I was thinking it was more easy than you said

    I never tried so I don't know for sure. Maybe you're right.
    If you have more experience with the Chromium code base maybe you can start a Chromium fork?

  8. jspenguin2017 commented on Jan 22, 2019

    @jspenguin2017
    Member

    Actually instead of trying to reinventing the wheel and fail miserably, I'll probably just take a wheel off the shelf.

    I'll probably still need a JavaScript runtime though, as RegExp in filters are JS RegExp. For a prototype it'll be fine, if it works out I'll worry about optimization later.

  9. mikhoul commented on Jan 23, 2019

    @mikhoul
    Author

    Thanks for your complete and detailed answer it's enlighting and it remove interrogations I had. 👍

    So it would be a little bit how AdGuard work, I never used AdGuard but my understanding is that there is a component that work at the OS level and another part as an extension for better efficiency.

    If you have more experience with the Chromium code base maybe you can start a Chromium fork?

    I don't have experience but it is something I 'm thinking about for 2-3 months to be able to modify the Chromium GUI and keep it tight, maybe I will give it a try this year, this issue will ad some motivation make this project higher in my priority.

    Regards :octocat:

  10. onmyouji commented on Jan 23, 2019

    @onmyouji

    Another way is to use Electron to build a new browser. Unlike WebExtension, Electron provides really powerful APIs, which are unlikely to go away. However, the amount of work to maintain a browser is likely more than that of a fork, but since Electron apps use JavaScript and not native code, vulnerabilities are less likely to occur.

    I don't really know about Electron, but I remember this talk about building a web browser in Electron. The security engineer actually recommends not try to do it. Their company tried it and it didn't go so well.

  11. nl255 commented on Jan 23, 2019

    @nl255

    Option 1: Use the new API
    If the new API is really weak, then I don't think Firefox can survive for long. If websites can more easily get around the weak APIs of Chrome, then website owners will have a motivation to push everyone to use Chrome. And soon Chromium-based browsers will probably become the only usable browsers.

    Are you saying that websites will simply block Firefox users entirely if Firefox insists on keeping the existing webRequest API?

    Option 3: Make a native app
    There's a shell there's a way. I'm sad to see that there's no open source native app that does more than DNS blocking.
    A native app is the best way to get around the constantly changing browser APIs, and as a bonus, it'll probably work for all browsers and even non-browser apps.
    I'm not sure how hard this will be though, last time I tried it didn't go so well.

    For this to work it would need to support HTTPS interception/rewriting which while it can be done opens up a huge can of worms security wise, especially if it is not done properly. It would also require having a companion GUI app for creating and installing the custom SSL certificate used for said interception as most people aren't going to be able to do it on their own using the standard command line tools. Even worse, on Android by default apps will not trust user installed root certificates (Chrome does but many other browsers and apps do not) and will need to be patched (unless the device is rooted, then the certificate can be installed to the system certificate store either directly or with a Magisk module).

  12. mikhoul commented on Jan 23, 2019

    @mikhoul
    Author

    @jspenguin2017 I have my answer for a fork on chromium to bypass a weak API if it was needed it'S possible and Brave seem to already use this strategy:

    A developer on the Brave team was explaining it on Reddit:


    _Bat-chriscat
    BAT TEAM[M] 34 points 1 day ago* RemindMe!

    It's worth noting that our Brave Shields (ad blocker) is not an extension; it is natively implemented. So extension API changes leave our shields unaffected.

    Edit: We can always remove any code or update we don't like from the Chromium base we use. So even if this didn't just affect extensions but something deeper, we could just exclude it._


    Source: https://old.reddit.com/r/brave_browser/comments/aijqm4/chrome_may_soon_change_how_3rd_party_ad_blockers/eeopqpb/

    So maybe if they already do that you could fork Brave to integrate natively Nano inside and bypassing the API to intercept the calls you need ? 🤔

    This way it would be future proof and the control would be very granular to block everything. User would just install the browser and use it. ☺️

    Regards :octocat:

  13. nhantrn commented on Jan 23, 2019

    @nhantrn

    @jspenguin2017 You might want to checkout Proxydomo hosted here on github. https://github.com/amate/Proxydomo

    It's a local proxy with https filtering capability. I've been using it to strip out <script /> among other filters of blacklisted pages before it even reach the browser. It's a reverse engineered program of the popular Proximitron in the early 2000s.

    There's also a recent separate effort called Proximitron Reborn, but I think the author of that hasn't release the source she promised yet. On going discussion of it is on the ancient prxbx forum here: https://prxbx.com/forums/showthread.php?tid=2331

  14. mikhoul commented on Jan 24, 2019

    @mikhoul
    Author

    Just to let know user that even the security guys at Mozilla seem to think it's a good Idea to weaken the API for extensions: https://old.reddit.com/r/firefox/comments/aithmh/raymond_hill_creator_of_ublock_origin_ubo_and/eerce78/

    Firefox seem to be just an inferior "Chrome clone" right now with no real differentiation and no advantage sadly.

    Keeping a strong and better API than Chromium could have been their Hail Mary but hey it's Mozilla as usual AKA stupid.

    Regards :octocat:

  15. 80 remaining items

  16. jspenguin2017 commented on Jun 22, 2019

    @jspenguin2017
    Member

    the blocking webRequest API is only available in the paid Enterprise version

    While it is possible for Google to strip the code from Chromium and only ship it in Chrome, I think you can get the enterprise version for free.

    Even if they do strip the code, I don't think they'll do anything to make it painful to re-add it as they would be stepping on their own toes.

  17. mikhoul commented on Oct 12, 2019

    @mikhoul
    Author

    Hi @jspenguin2017 ,

    Not precisely related to Manifest V3 but it's in the same vein with Google attempt to restrict ad-blockers ...

    From this Issue in UBO https://old.reddit.com/r/uBlockOrigin/comments/dgncga/dev_build_1225rc1_rejected_from_chrome_web_store/ I understand that UBO will possibly be no longer available from the CWS and I fear the same thing will happen to Nano.

    What is your take on this @jspenguin2017 ? 🤔

    Regards !

  18. jspenguin2017 commented on Oct 12, 2019

    @jspenguin2017
    Member

    @mikhoul Sometimes false positive happen, it usually gets resolved after a resubmission or an email. I don't think it's a problem.

  19. okiehsch commented on Oct 12, 2019

    @okiehsch

    usually gets resolved after a resubmission or an email.

    uBlockOrigin/uBlock-issues#745 (comment)

  20. mikhoul commented on Oct 12, 2019

    @mikhoul
    Author

    uBlockOrigin/uBlock-issues#745 (comment)

    Gorhill have a rigid personality and did not change anything in the code when he resubmitted so it's expected to receive the same results. Just changing some code "cosmetically" could have resulted in the the extension to have passed instead of being rejected.

    Gorhill has many quality (very good developer, focused, hard worker) but he is not flexible and he is a little bit in his bubble, he did not even try to contact Google by other mean than answering to the email, he just marked the issue as "wontfix".

    Anyway right now Google is looking in the issue: https://old.reddit.com/r/chrome/comments/dgoymg/warning_ubo_ublock_origin_will_possibly_be/f3e4fi6/

    image

  21. okiehsch commented on Oct 12, 2019

    @okiehsch

    1.22.5rc2 has been approved in the CWS.

    did not change anything in the code when he resubmitted

    After they rejected 1.22.5rc1 he submitted 1.22.5rc2 which was also rejected.
    Here are the code changes gorhill/uBlock@1.22.5rc1...1.22.5rc2.

  22. mikhoul commented on Oct 12, 2019

    @mikhoul
    Author

    1.22.5rc2 has been approved in the CWS.

    Good news so it was just some kind of mistake of a false positive like @jspenguin2017 was saying.

  23. jspenguin2017 commented on Oct 12, 2019

    @jspenguin2017
    Member

    It's likely caught in some automatic filter, usually (so far, every time for me) sending an email to request a human review corrects the problem.

  24. okiehsch commented on Oct 13, 2019

    @okiehsch

    Good news so it was just some kind of mistake of a false positive

    I never thought it was some nefarious scheme to get rid of uBO but I find it puzzling that after nearly ten years of CWS a company like Google still has a system in place that makes it very difficult for developers to resolve issues with the automatic filter.
    See the links at uBlockOrigin/uBlock-issues#745 (comment) for more examples.

  25. jspenguin2017 commented on Oct 13, 2019

    @jspenguin2017
    Member

    I feel that WebStore is easier to use (for developers) than Microsoft Store and AMO. Although it looks ugly, it is blazing fast. Microsoft Store is definitely the worst in term of performance, it takes forever to load and does not offer a functioning automation API.

    As for clearing false positives, WebStore have been the easiest among the three in my experience, simply replying the automatic email is enough to get a human review. Unlike the other two which require submitting a new version with an explanation letter.

  26. okiehsch commented on Oct 13, 2019

    @okiehsch

    Point taken, you are clearly in a better position to make an argument about the quality of CWS than I am.
    I can only go by anecdotal evidence and reading through dessant/search-by-image#57 especially the replies by google felt like a kafkaesque experience to me.

  27. jspenguin2017 commented on Oct 13, 2019

    @jspenguin2017
    Member

    Every store have some weird policies. Microsoft Store doesn't allow screenshots to have description on the top 75% of the image, but it's perfectly fine on the bottom. AMO doesn't allow $ to refer to a library that's not a trusted (hash whitelisted) version of jQuery, but it's perfectly fine after renaming the namespace.

    I do agree that WebStore emails have poorer quality than the other two stores' and I do wish WebStore emails would contains proper description and actionable directives like those from the other two stores, but I don't think this is something to freak out about.

  28. changed the title [-]Chrome Manifest V3 discussion mega thread[/-] [+]Chrome Manifest V3 discussion megathread[/+] on Apr 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions