Coder Social home page Coder Social logo

adblocker's Introduction

ADBlocker

You can use this in your webview to filter annoying ads.

从AdBlockplus的项目中摘出了一部分代码,再进行一些自己的实现,就是这个项目了。 源项目在这里:https://github.com/adblockplus/adblockplusandroid

AdBlockplus是通过设置wifi代理的方式,将手机全局的代理设置到本机的2020端口,然后在2020端口进行广告的过滤。 其广告过滤的规则使用的是社区维护的规则表,不同的地区有不同的规则表

本项目去掉了AdBlockplus中的代理部分,只保留了核心的功能————根据规则表来判断url是否应该被过滤。 将这个功能添加到浏览器中(正如demo中的实现一样),就可以实现类似于猎豹浏览器的广告过滤效果

下面是三个可以使用的规则地址(过滤强度依次减弱):

https://easylist-downloads.adblockplus.org/easylistchina+easylist.txt https://easylist-downloads.adblockplus.org/easylistchina.txt https://adfiltering-rules.googlecode.com/svn/trunk/lastest/rules_for_ABP.txt

源项目是符合GPL的开源协议的,所以我这个也只能GPL了,有需要的童鞋自己解决协议的问题吧。。。

adblocker's People

Contributors

penglu20 avatar

Watchers

James Cloos avatar

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.