Skip to content
This repository has been archived by the owner on Nov 15, 2017. It is now read-only.

Be able to parse Adblock Plus filter lists to extract and enforce domain rules #149

Closed
gorhill opened this issue Jan 15, 2014 · 5 comments
Closed

Comments

@gorhill
Copy link
Owner

gorhill commented Jan 15, 2014

HTTPSB could make use of the block-by-domain-name rules in AdBlock Plus: https://adblockplus.org/en/filter-cheatsheet#blocking2.

This, with finding a solution to the import of non-predetermined blacklists (issue #39) would allow user to be even more in control of what to preset-block.

@ghost
Copy link

ghost commented Jan 16, 2014

HTTPSB could make use of the block-by-domain-name rules in AdBlock Plus:
https://adblockplus.org/en/filter-cheatsheet#blocking2

While I appreciate the idea in general, I wonder why you want to restrict
it to block-by-domain-name rules as cases like, e.g.,

http://example.com/ads/banner123.gif

would not be covered. (On the other hand, domains blocked by those rules
should normally already be included in the hosts files integrated in
HTTPSB and blacklisted/graylisted anhow). Blocking by address parts and
blocking exact addresses should therefore also be supported.

Thus, if you really want to go that way I suggest that you don't do it
halfway ;-) However, the filter syntax is rather complex
(https://adblockplus.org/en/filters), I guess this would need a lot of
work to implement that.

Another thing: If you're using HTTPSB with Adblock and Ghostery, Adblock
"sees" and "blocks" a lot of requests which are already blocked by
HTTPSB, and Ghostery "sees" and "blocks" a lot ot trackers which are
already blocked by Adblock and HTTPSB. So if you integrate those
filterlists, it might make sense to also define priority rules (or
whatever you might call it) that those lists are only parsed if the
elements to be blocked are not yet blacklisted/graylisted in order to
avoid performance degradations.

@gorhill
Copy link
Owner Author

gorhill commented Jan 16, 2014

Blocking by address parts and blocking exact addresses should therefore also be supported

No. Sorry.

I am not going to make HTTPSB into something I don't intend to make it at this point. Alternative is GPLv3, fork, etc.

My reason is the core of HTTPSB, I won't overcomplicate it at this point. This piece of code has worked marvelously for both filtering requests and displaying the matrix since pretty much the beginning of HTTPSB. It's fast, performant, logical and most importantly transposes exactly into a matrix UI.

What you ask above has further complications and I think now I am going to ask for wishes that go to the core of HTTPSB to be completely fleshed out in details, not just on the surface while I am being asked to figure all the difficult issues of UI etc.

How do you display in the matrix http://example.com/ads/banner123.gif blocked and http://example.com/ads/not-a-banner123.gif not blocked?

If you want to cast negatively this proposed feature with the expression "halfway" as a way to make me feel bad to not agree, so be it, it is going to be done halfway, I don't plan a for a major core and UI rehaul of HTTPSB to make it into whatever AdBlock does.

I want this project to keep its fun hobby nature from my POV. Being asked to rewrite everything from the ground up without a clearly defined view of how to keep a clear matrix-based UI at the end, I see this as a chore.

@ghost
Copy link

ghost commented Jan 16, 2014

I'm very sorry that you feel offended. My remarks were not meant to be offending or to make you feel bad but were rather meant to be constructive. Obviously I have used the wrong words, perhaps due to the fact that English is not my native language as you know. Again, I feel very sorry about that.

As a consequence and in order to avoid further unintended misunderstandings, this is my last comment for this project.

@gorhill
Copy link
Owner Author

gorhill commented Jan 22, 2014

I consider this top priority so that I can run comparison benchmarks which could make HTTPSB allow-all/block-exceptionally look better if the Fanboy Ultimate list is used.

gorhill added a commit that referenced this issue Jan 22, 2014
@gorhill gorhill closed this as completed Jan 27, 2014
@gorhill
Copy link
Owner Author

gorhill commented Mar 4, 2014

Blocking by address parts and blocking exact addresses should therefore also be supported

After some experimentations the last two days, I realize this is actually a good idea.

My apologies for having been so rudely dismissive.

The idea I am currently entertaining is to keep this as simple as possible though: go through the AdBlock filters only for HTTP requests which are not blocked. And just a checkbox somewhere in the settings on whether the AdBlock rules should also be parsed and enforced. No other UI than this.

I currently do have a standalone prototype, but given that HTTPSB has already all the framework to read, update, etc ABP files, there are efficiencies to be gained if I move the code from the standalone to HTTPSB. I would leave DOM-modifying rules out though for the time being.

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

No branches or pull requests

1 participant