Giter VIP home page Giter VIP logo

Comments (11)

faxotherapy avatar faxotherapy commented on June 2, 2024

Refer to this website for more info.

from privoxy-adblock.

essandess avatar essandess commented on June 2, 2024

Thanks! Does your fork https://github.com/faxotherapy/privoxy-adblock have the fixes described in your post?

from privoxy-adblock.

faxotherapy avatar faxotherapy commented on June 2, 2024

No, it doesn't. Just retrieve the archive that sits at the bottom of this post and you'll be good.

from privoxy-adblock.

essandess avatar essandess commented on June 2, 2024

Thanks again. Those look like useful mods. Do you mind if I ask a few follow-up questions?

  1. Do you know which AdBlock formats are and are not handled by the regex's in this repo and your archive?
  2. Have you tackled corrections to the Privoxy .filter files created by privacy-adblock.sh? For example, the entry corresponding to &ad_box_ doesn't appear correct:
s@<([a-zA-Z0-9]+)\s+.*id=.?ad_box.*>.*</\1>@@g
  1. I'm interested in translating the EasyList blocks into an efficient(ish) Javascript proxy.pac filtering file, which would allow for HTTPS blocks without setting up Privoxy as a SSL intercept. Are you aware of existing code for this?

Using a proxy.pac in conjunction with Privoxy would cover the board for applications that use TLS versus HTTP and automatic proxy configurations versus not.

from privoxy-adblock.

faxotherapy avatar faxotherapy commented on June 2, 2024
  1. I've never looked at the page you mentioned, but I found it interesting. Thanks for bringing this to my attention. Apparently, the path part in the original conversion script is correct “in the middle”, not at the beginning of a path pattern to block. Just like you mentioned above for &ad_box_; the add-on I offer only turns it to /.*&ad_id. With regard to domain blocking, the add-on removes the backslashes.
  2. I did not tackle the filter part. So, I guess I can leave it to you… 😀Correcting the syntax for both the host and the path side exhausted me.
  3. No, I'm not aware. Not sure whether it's possible to use an auto config file at the same time Privoxy is used. Isn't it either one or the other?

As Privoxy doesn't see the path side of a HTTPS request—it can only block the host part of a HTTPS request—I use ProxHTTPSProxy to allow Privoxy see it.

from privoxy-adblock.

essandess avatar essandess commented on June 2, 2024

Yes, you can use proxy.pac as a front-end filter before passing to the proxy—see osxfortress for an example.

This works very well, and avoids the pitfalls of an SSL intercepting proxy.

It is necessary to write the regex rules efficiently as a DFA in JavaScript.

All these various AdBlock translation issues look like something that bison should cover if anyone ever wrote out the AdBlock grammar. Are you aware of this?

That would be a lot easier than writing a zillion one-off regex's for every scenario.

from privoxy-adblock.

faxotherapy avatar faxotherapy commented on June 2, 2024

All these various AdBlock translation issues look like something that bison should cover if anyone ever wrote out the AdBlock grammar. Are you aware of this?

No, I'm not.

Certainly, based on what I learnt from your input, there's definitely another approach, much simpler than the overcomplicated translation from the add-on.

from privoxy-adblock.

essandess avatar essandess commented on June 2, 2024

I've created an EasyList to filtering proxy.pac file in the repo easylist-pac-privoxy.

It's quite efficient and runs on mobile devices. Comments welcome.

from privoxy-adblock.

essandess avatar essandess commented on June 2, 2024

The forked repo adblock2privoxy, is a full-feature implementation of EasyList rules in Privoxy, complete with element hiding.

This is a clever, efficient, and effective implementation: Privoxy handles the domain and path blocking rules using efficient and correct regular expressions, and Privoxy inserts targeted EasyList-based CSS files to handle element hiding.

In addition to Privoxy, this approach requires a simple (nginx) web server for the CSS files. I've posted an example nginx .conf configuration file that hosts these on the LAN over port 8119.

I'd encourage anyone interested in achieving network layer EasyList tracker and ad blocking to take a look at this approach.

from privoxy-adblock.

Redback812 avatar Redback812 commented on June 2, 2024

It be great if this could run from a router with DD-WRT O/S, which is a nix in itself, since DD-WRT has privoxy running on the system, all this work would need is a slight modification. If the system internal flash is to small , then a USB 3 stick could do the job.

from privoxy-adblock.

essandess avatar essandess commented on June 2, 2024

It would be straightforward to get adblock2privoxy on DD-WRT.

You'd simply need to copy over the privoxy configuration and CSS files, and
must install nginx on DD-WRT, or use its native (lighttpd?) webserver to serve the CSS files that are used for element blocks.

Regular updates could be rsync'd to the router.

Here's an updating daemon example for macOS: com.github.essandess.adblock2privoxy.plist.

from privoxy-adblock.

Related Issues (7)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.