Skip to main content

An anti-capitalist ad-blocker that uses the hosts file

Project description

TBlock logo


Awesome Humane Tech Pipeline status Hosted on Codeberg


TBlock is a free and open-source system-wide ad-blocker that is compatible with most filter list formats.


  • Blocks ads and trackers system-wide
  • Compatible with most filter list formats
  • Has an online repository to help you find and subscribe to popular blocklists in an easy way
  • Has a built-in filter list converter
  • Has a built-in daemon that regularly updates the filter lists and prevents your hosts file from being modified by other programs and users


You can easily install TBlock with:

pipx install tblock

More installation methods — such as Windows installer and packages for Linux distributions — can be found on the website.


After installing, you need to update the repository index and subscribe to the default blocklist in order to enable protection against ads and trackers:

tblock -Sy tblock-base

If afterwards you want to disable TBlock's protection, you can do so by running:

tblock -D

Then, to enable it again:

tblock -H

You can find other blocklists on the repository and more information on how to use TBlock in the documentation.


Here is a list of the upcoming changes in TBlock code. Suggestions are, of course, welcome.

  • Mark filter lists that are included in another list as subscribed when the user subscribes to the list
  • Allow virtual filter lists to exist (would act as a "group", like base-devel does on Arch Linux)
  • Implement a GUI for TBlock
  • Rewrite the entire code, make a clearer public API and publish release 3.0.0


Everyone is welcome to contribute to TBlock in different ways. Bug reports can be made directly from the Gitea issue tracker, by sending an email to the team or in our Matrix room.

If you want to suggest a modification in the code, you can open a pull request or send your patch using email or Matrix.

If you want to be a beta-tester, you can install the latest beta version from our release page and contact us to give a feedback.

You can find more information on how to contribute here.

Authors and acknowledgment

TBlock is currently mainained by Twann, who is also its creator. A big thank you to all the people who contribute(d) to the project.


Here is a list of all libraries used in the project:

Name Author License
colorama Jonathan Hartley BSD
requests Kenneth Reitz Apache 2.0
urllib3 Andrey Petrov MIT
argumentor Twann LGPLv3




This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tblock-2.3.0.tar.gz (56.8 kB view hashes)

Uploaded source

Built Distribution

tblock-2.3.0-py3-none-any.whl (64.9 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page