Coder Social home page Coder Social logo

00tobias / adblock-rust-server Goto Github PK

View Code? Open in Web Editor NEW

This project forked from dudik/adblock-rust-server

0.0 0.0 0.0 35 KB

Server wrapper around the adblock crate using Unix domain sockets.

Home Page: https://crates.io/crates/adblock-rust-server

License: GNU General Public License v3.0

Rust 100.00%

adblock-rust-server's Introduction

adblock-rust-server

Server wrapper for the adblock crate using Unix domain sockets.

Created for blockit, but can be used in any program that supports Unix domain sockets.

Usage

Add urls of filter lists (e.g. https://easylist.to/easylist/easylist.txt) to ~/.config/ars/urls.
Custom rules (e.g. ###customAd) should be added to ~/.config/ars/lists/custom.

API

After launching adblock-rust-server connect to /tmp/ars socket file to start communicating. Every request and response message have to end with a new line character \n. Two request types are supported:

Network request

n <request_url> <source_url> <request_type>

For example: n https://duckduckgo.com/p103.js https://duckduckgo.com/ script

Checks if the request should be blocked. Returns 1 if it should and 0 if not.

Cosmetic request

c <website_url> <ids> <classes>

For example: c https://duckduckgo.com/ pg-index wedonttrack content_homepage logo_homepage_link

Returns a CSS rule that hides unwanted elements. <ids> and <classes> are lists of id/class names separated by the tab character \t.

Reload engine request

r Restarts the adblock-rust engine applying any changes made to fiter lists or custom rules.

Force update request

u Updates every filter list and restarts the engine.

adblock-rust-server's People

Contributors

dudik 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.