jspenguin2017 / uBlockProtector

An anti-adblock defuser for Nano Adblocker and uBlock Origin
GNU General Public License v3.0
740 stars 83 forks source link

[Discussion] Automation and AAK-Cont #665

Closed jspenguin2017 closed 6 years ago

jspenguin2017 commented 7 years ago

Important Update:

AdBlock Protector 2 is ready for developer beta, it currently only work with uBlock Origin (any browser), because even though I have libmicro code in there I'm 150% sure it's bugged beyond belief. Be warned that on Quantum, libquantumizer will inject 'unsafe-inline' to every page. This may change in the future when the CSP bug is fixed in Quantum.

Because ABR2 is now ready for developer beta, AAK-Cont will now stop accepting new issues, it will still be available for download, and the daily build task will run until ABR2 hits stable for 1 month.

https://adblockprotector2.github.io/AdBlockProtector2/


Things are getting boring and repetitive here, and no one wish to help on AAK-Cont side. Let's solve these two problems at once.

When we talk about AAK-Cont, we think about cross browser support. Unfortunately, that project have not attracted enough attention and support, so I will end-of-life it if my following plan went as planned. [Update: I meant not enough attention from developers]

I want to create a new project, name undecided [Update: decided below], which will support Chrome, Chromium, Opera, and Quantum browsers; uBlock Origin, Adblock Plus, and AdBlock adblockers. Just like this project, it will be composed of a filter list and an extension (not Userscript). Support for Safari will be dropped and support for Edge is undecided. You are probably thinking, wouldn't that be even more boring and repetitive? Well, yes, unless... unless I have a bot to maintain all those repositories for me, it will scan for changes every day, and generate compatibility shim for each setup.

Not sure how well this will go, I already have a graveyard of failed projects, one more wouldn't hurt. The important part is having fun.

jspenguin2017 commented 7 years ago

Extension Design

Update: This takes a bit of work to implement and I'm not sure how much value will it add. For now, libmicro will kick in when uBO is not present and the bootstrapper will not check for other configuration.

One major problem we are having is that people don't know what to install. Although I like the idea of letting the user to decide what to do, an average person can't make a good decision. Therefore, for the new project and the new project only, the companion extension will perform some testing:

jspenguin2017 commented 7 years ago

Bot Design

The bot will be equipped with a few parser and a few compatibility shim generators. It will download uBlock Protector and uAssets repositories, and generate code that would work for each platform once a day. It will also respond to explicit commands from me. This is the hard part, but also the fun part, I will be thinking and planning this in the coming weeks and hopefully I can get a working prototype by the end of the year.

jspenguin2017 commented 7 years ago

TODO List

Shims

jspenguin2017 commented 7 years ago

Reserved

uBlock-user commented 7 years ago

Merge this into uBlock Protector and run it when it's ran for the first time and detect the setup, so give shim to those who're on other blockers and keep Protector for uBO users. Doable ?

jspenguin2017 commented 6 years ago

@thrwat I don't, that's why I'm getting a bot to help me out. And don't thank me yet, the future is unknown.

@uBlock-user Manifest configuration cannot be changed programmatically on Chromium, although I will investigate that idea for the companion extension for Quantum.

jspenguin2017 commented 6 years ago

The new project will be called AdBlock Protector 2 (ABR2 for short). https://github.com/AdBlockProtector2 The bot will be called Alpha Bot, bot account name undecided, please refrain from rushing out registering every good name that starts with Alpha.

uLint is renamed to FilterLinter and moved under ABR2, same for EinZinY.

KonoromiHimaries commented 6 years ago

Unfortunately, that project have not attracted enough attention and support

i think this is not good marketing 2017-10-29 14_05_48-ublock protector extension - chrome web store

jspenguin2017 commented 6 years ago

Not this project, AAK-Cont: https://xuhaiyang1234.gitlab.io/AAK-Cont/ I think it looks OK, if you can get a better design, let me know. I'm programmer, not artist, my art skill stinks and I know it.

Also, I mean I haven't got enough attention from other developers, there are plenty of users and issues are stacking up in AAK-Cont but no one wants to help solving them.

I'm not trying to market uBlock Protector, as I use it, so it has 1 user or 1 million doesn't change anything, I'm not trying to get people to use it. If you found someone on forums who advertises uBlock Protector, then that person is NOT me.

jspenguin2017 commented 6 years ago

I think it's a good opportunity to clean up some inefficient server code, I also moved /API/uBlockProtector to just /uBlockProtector, if there are any path that I forgot to change, let me know. Hopefully I didn't introduce any vulnerability while moving stuff around...

I still need to clean up the ultra slow client, although it's not as much of a priority since modern devices can handle the inefficiency. I'll start making the bot next week or the week after, anyone know a good GraphQL client library for Node?

uBlock-user commented 6 years ago

anyone know a good GraphQL client library for Node?

https://github.com/f/graphql.js ??

Piter432 commented 6 years ago

Why no userscript? :(

jspenguin2017 commented 6 years ago

Userscript depends on script hosts, which are made by independent author without consensus. There are no international standard for Userscript, making development impossible.

uBlock-user commented 6 years ago

UserScripts can't use browser API directly, which is a limitation.

lfmnovaes commented 6 years ago

I prefer this way, a complementary extension for uBlock. Looking forward to see the FF57 version of this.

jspenguin2017 commented 6 years ago

It will probably only run on 58+ of Quantum. 57 has incomplete APIs and broken CSP, I don't think it's possible to make a version that runs on 57 without breaking some security features.

I haven't started coding the bot yet, don't expect it before next year.

jspenguin2017 commented 6 years ago

I need to learn GraphQL, write a filter parser and transpiler, then make a customer service bot. I have only 1 line of code at the moment, at current pace, I won't be done before 2020. If someone wants to speed things up, PRs are welcomed over at AlphaBot repo.

jspenguin2017 commented 6 years ago

I have 3 lines of code now. Progress... Maybe I should make it a standalone application instead of integrating into my existing server.

Also I rewrote clients, profiler shows they are 20 times faster, but whatever, they weren't slow to begin with.

jspenguin2017 commented 6 years ago

Quantum 57 hit stable! Time to code!

jspenguin2017 commented 6 years ago

I'm not sure how to use Quantum's debugger, ABR2 definitely works on Chrome, but I still have some debugging to do for Quantum, if someone wants to test it out, it's available for developers now. (See update in the opening)

What to report:

What to not report:

Also, don't report here, it'll get messy, report to ABR2 issues tracker. Also refrain from posting "same here" or "+1", use the thumbs up (or down in case you can't reproduce) emoji instead.

siric commented 6 years ago

Bot Design

The bot will be equipped with a few parser and a few compatibility shim generators. It will download uBlock Protector and uAssets repositories, and generate code that would work for each platform once a day. It will also respond to explicit commands from me. This is the hard part, but also the fun part, I will be thinking and planning this in the coming weeks and hopefully I can get a working prototype by the end of the year.

Have you considered using Webpack for this? After setting up it's configs it could do all of the automation for you, include the defined shims per browser, and generate builds for the supported browsers with one single command. Example boilerplate: https://github.com/samuelsimoes/chrome-extension-webpack-boilerplate

jspenguin2017 commented 6 years ago

Currently the extension is universal, the single extension runs in every supported browser. Shims will activate themselves on runtime. The build bot really just pull 4 repositories (with child-process) then copy some files around, really no need for an external framework. Most of the work is making libmicro and splitting filter lists.

jspenguin2017 commented 6 years ago

It's almost ready, I just need to make a costume service bot then it's ready for public beta. Anyone know how do you inspect options page in Quantum? I can't seem to be able to inspect inside that element... image

siric commented 6 years ago

Tried to inspect the same thing but looks like that's not possible. Why would you need that though? I don't believe you can give that any styling if that's what you wanted to do because FF enforces it's design guidelines on it - unless you do a custom settings page.

jspenguin2017 commented 6 years ago

Styling does work, except the right border is missing, and I was trying to understand why. That page is fully inspectable on Chrome though.

jspenguin2017 commented 6 years ago

Alright, the developer beta is fully ready now, it should work in Quantum and Edge (and Chrome ofc). Let's continue the discussion over in that repository.

uBlock-user commented 6 years ago

Are you going to discontinue uBlock Protector once AdBlockProtector2 is stable ?

jspenguin2017 commented 6 years ago

No, uBR is a dependency of ABR2.

jingyu9575 commented 6 years ago

how do you inspect options page in Quantum

The inspector works here on 58.0b4 (Developer Edition) when out-of-process extensions are disabled. When it didn't work, I could debug the extension in about:debugging and switch the frame default to the option page, and then the page would be inspectable there.

jspenguin2017 commented 6 years ago

OK, I'll try that when 58 hits stable.