gitwtfhub

wtf is urlfilter?

adguardteam/urlfilter — explained in plain English

Analysis updated 2026-07-09 · repo last pushed 2026-06-25

113GoAudience · developerComplexity · 3/5ActiveSetup · hard

TL;DR

A Go library that reads and applies ad-blocking and content-filtering rules, supporting standard ad-block lists, hosts-style blocking, and cosmetic rules for hiding page elements. Built by AdGuard and designed for integration into browsers, proxies, and networking tools.

Mindmap

mindmap
  root((repo))
    What it does
      Parses filtering rules
      Blocks network requests
      Hides page elements
    Rule types
      Standard ad-block lists
      Hosts file blocking
      Cosmetic rules
    Use cases
      Custom browser ad-blocking
      DNS-level ad blocker
      Parental control app
      Privacy network tool
    Tech stack
      Go
      Memory optimized
    Limitations
      No usage docs yet
      Scriptlets incomplete
      HTML filtering incomplete
    Includes
      MITM proxy example

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Why would anyone build with this?

REASON 1

Build a custom browser with built-in ad-blocking and content filtering.

REASON 2

Create a DNS-level ad blocker that filters traffic for an entire home network.

REASON 3

Develop a parental control app that blocks unwanted content by domain or page element.

REASON 4

Add privacy-focused traffic filtering to a networking tool or proxy.

What's in the stack?

Go

How it stacks up

adguardteam/urlfilteraymanhs/nanotdbfengzi1221/proxy-installer
Stars113102128
LanguageGoGoGo
Last pushed2026-06-25
MaintenanceActive
Setup difficultyhardmoderatemoderate
Complexity3/53/53/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you spin it up?

Difficulty · hard Time to first run · 1h+

No usage instructions in the README yet, developers need to read the source code directly to understand how to use the library.

The license is not mentioned in the explanation, so the terms of use are unclear.

Wtf does this do

AdGuard's urlfilter is a tool that helps developers build ad-blocking and content-filtering features into their own applications. Instead of starting from scratch to figure out how to block ads, trackers, or unwanted content, a developer can use this library to handle the heavy lifting of interpreting filtering rules. At its core, the library reads and applies filtering rules, essentially a list of instructions that say "block requests to this domain" or "hide this element on the page." It supports the same rule syntax that AdGuard uses across its own products, which is a widely recognized standard in the ad-blocking world. This means it can process standard ad-blocking lists, hosts-file-style blocking (like mapping a domain to nowhere), and even cosmetic rules that hide page elements rather than blocking network requests. The library also includes an example of a "man-in-the-middle" proxy, which means it can sit between a user's device and the internet, inspecting and filtering traffic as it flows through. This would be useful for anyone building a custom browser, a privacy-focused networking tool, a parental control app, or a DNS-level ad blocker. For example, if a startup wanted to create a router that blocks ads for every device on a home network, this library could power the rule engine that decides what gets blocked. It gives developers access to a proven filtering system without needing to build one from scratch. The project is written in Go, a programming language known for speed and efficiency, and the README notes that memory optimization has been a focus. That said, the library is still a work in progress. Several advanced features, like scriptlet rules, HTML filtering, and certain modifiers for handling cookies or redirects, are listed as incomplete. The README also doesn't include usage instructions yet, so developers would need to dig into the code to get started.

Yoink these prompts

Prompt 1
I want to use AdGuard's urlfilter Go library to build a simple proxy that blocks ad domains from a standard ad-block list. Write a Go program that loads a filter list and checks if a given URL should be blocked.
Prompt 2
Help me integrate the AdGuard urlfilter library into my Go application. Show me how to parse and apply cosmetic filtering rules to hide specific HTML elements on a page.
Prompt 3
Using the AdGuard urlfilter library in Go, write code that loads a hosts-file-style blocking list and checks whether a domain like 'example-tracker.com' should be blocked.

Frequently asked questions

wtf is urlfilter?

A Go library that reads and applies ad-blocking and content-filtering rules, supporting standard ad-block lists, hosts-style blocking, and cosmetic rules for hiding page elements. Built by AdGuard and designed for integration into browsers, proxies, and networking tools.

What language is urlfilter written in?

Mainly Go. The stack also includes Go.

Is urlfilter actively maintained?

Active — commit in last 30 days (last push 2026-06-25).

What license does urlfilter use?

The license is not mentioned in the explanation, so the terms of use are unclear.

How hard is urlfilter to set up?

Setup difficulty is rated hard, with roughly 1h+ to a first successful run.

Who is urlfilter for?

Mainly developer.

View the repo → Decode another repo

This repo across BitVibe Labs

Don't trust strangers blindly. Verify against the repo.