https://github.com/zatvobor/adlist
Bundling hosts files and use it on RouterOS driven devices
https://github.com/zatvobor/adlist
ad-blocker adlist hosts mikrotik routeros
Last synced: 14 days ago
JSON representation
Bundling hosts files and use it on RouterOS driven devices
- Host: GitHub
- URL: https://github.com/zatvobor/adlist
- Owner: Zatvobor
- Created: 2024-05-06T11:08:28.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-05-16T06:32:40.000Z (over 1 year ago)
- Last Synced: 2025-07-03T15:47:13.979Z (4 months ago)
- Topics: ad-blocker, adlist, hosts, mikrotik, routeros
- Language: Shell
- Homepage:
- Size: 3.91 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## adlist
This is a quite simple utility for managing `NXDOMAIN` static DNS records driven by RouterOS.
You will be able to specify as many `hosts` files you have and get a sorted and uniq bundle as a `.auto.rsc` script.The resulted bundle has a form:
```
:do {
:local hosts {"example.com";"sub.+\\.example\\.com";};
:foreach host in=$hosts do={
:do {
:if ($host ~ "\\.\\+") do={
/ip/dns/static/add regexp=$host type=NXDOMAIN comment=example;
} else={
/ip/dns/static/add name=$host type=NXDOMAIN comment=example;
};
} on-error={ :nothing };
};
};
```I've added a `submodule` [which contains a curated list](https://github.com/StevenBlack/hosts) of hosts, in case if you don't have any.
See `mkadlist.sh` before you hit it and change it for your needs.