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

Spin-off a standalone filtering library #332

Open
gorhill opened this issue Jun 6, 2014 · 9 comments
Open

Spin-off a standalone filtering library #332

gorhill opened this issue Jun 6, 2014 · 9 comments

Comments

@gorhill
Copy link
Owner

gorhill commented Jun 6, 2014

In case other devs would want to use it.

It won't support HTTPSB-matrix inheritance, as this is rather HTTPSB-UI-specific.

It will though support ABP net filtering and plain hostname-based filtering.

@jonvuri
Copy link

jonvuri commented Jun 6, 2014

Perhaps the filtering pipeline could be re-implemented a stream, with each part of the filtering being an intermediate transform/filter on the stream? That way it would be trivial to implement the matrix-style filtering as well as more flexible variations.

@gorhill
Copy link
Owner Author

gorhill commented Jun 6, 2014

Perhaps the filtering pipeline could be re-implemented a stream

I think I will focus on making an as efficient as possible atomic filtering engine. From there, as performance allows, users of the library could run a single request through many queries to the filtering engine according to their own filtering heuristic.

@jonvuri
Copy link

jonvuri commented Jun 6, 2014

Do you have a general idea of how that interface would look? Like, what would ??? be:

switchboard.filter(webRequest, ???);

@ghost ghost mentioned this issue Jun 11, 2014
@jonvuri
Copy link

jonvuri commented Jun 11, 2014

Regarding discussion in #86 I just want to clarify if this library will support all of the functionality of HTTPSB, namely filtering different types of requests (img, frame, etc.), or if that will have to be implemented on top of it. (Also above question still standing.)

@gorhill
Copy link
Owner Author

gorhill commented Jun 11, 2014

A low-level library. Supply it with ABP-compatible filters or plain hostnames (which really translate into ABP-compatible ||example.com^), then test a URL against it, optionally with context info (request type, doc domain, etc). ABP-compatible filters support request types (||example.com^$image or ||example.com^$~stylesheet). I don't know how else to describe it.

@jonvuri
Copy link

jonvuri commented Jun 11, 2014

Okay, I suppose that sounds like it would work well enough, though it wasn't what I was expecting. Is that how HTTPSB currently works internally?

Also, would this new library also be used by HTTPSB? That would seem to be best so that any new optimizations in the future are also leveraged by other consumers of the engine.

@gorhill
Copy link
Owner Author

gorhill commented Jun 11, 2014

would this new library also be used by HTTPSB?

No, I consider HTTPSB matrix filtering + ABP filtering pipeline to be higher-level application-specific feature.

@jonvuri
Copy link

jonvuri commented Jun 11, 2014

Oh, I see. But then you could still use the library for the ABP part of the pipeline right? I am only concerned that the library will stagnate in the long term if it is not leveraged by the upstream.

@kurtextrem
Copy link

That plan sounds great.

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

No branches or pull requests

3 participants