Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jac18281828/fetch_adblocker
fetch adblocker host list fo dnsmasq for use in Pi Hole or EdgeRouter network router
https://github.com/jac18281828/fetch_adblocker
Last synced: about 1 month ago
JSON representation
fetch adblocker host list fo dnsmasq for use in Pi Hole or EdgeRouter network router
- Host: GitHub
- URL: https://github.com/jac18281828/fetch_adblocker
- Owner: jac18281828
- Created: 2020-12-20T02:23:50.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2023-12-31T22:50:50.000Z (about 1 year ago)
- Last Synced: 2024-10-15T19:13:58.764Z (3 months ago)
- Language: Python
- Size: 18.6 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Unifi Fetch Adblocker
[![Test](https://github.com/jac18281828/fetch_adblocker/actions/workflows/ci-image.yml/badge.svg)](https://github.com/jac18281828/fetch_adblocker/actions/workflows/ci-image.yml)
## Pi-hole setup for Unifi router
Fetch Steven Black's host file for a dnsmasq based adblocker. Either Pi Hole or Unifi UDM routers can use this method.
Steven Black’s [Hosts](https://github.com/StevenBlack/hosts) is a unified hosts file that consolidates several reputable hosts files and merges them into a single hosts file. It is a plain-text file used by all operating systems to map hostnames to IP addresses. It is used to block ads, malware, and other unwanted traffic by redirecting the traffic to a non-existent IP address.
Pi-hole is a network-wide ad blocker that runs on Raspberry Pi. It uses Steven Black’s Hosts list to block ads and other unwanted traffic. Pi-hole is a DHCP server that automatically assigns IP addresses to devices on the network and blocks ads and other unwanted traffic. A Unifi UDM router can be used in the same way by configuring the hosts list to work with dnsmasq.
This script is designed to pull the latest version of the hosts list and convert it to dnsmasq format.
1. special characters are filtered
2. whitelist
3. blacklist## INSTALL
1. copy fetch_masq.py for python3
2. chmod 755 fetch_masq.pyNote: fetch_mas2.py works with python2 on legacy router firmware.
## RUN
` ./fetch_masq.py > /etc/dnsmasq.d/dnsmasq.adblock.conf `
## LEGACY
'fetch_masq2.py' - legacy python 2 implementation