You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
829 B
Markdown

6 years ago
# adguardhome-filters
Hosts lists from Steven Black (https://github.com/StevenBlack/hosts)
6 years ago
Cleaned-up from "localhost" records.
127.0.0.1 replaced to 0.0.0.0
Extensions are left unmerged.
6 years ago
6 years ago
Files are used for AdGuard Home DNS filtering.
6 years ago
P.S. Looking for the way to translate easily multiple hostname records
to one line accordingly to general AdBlock rules set, i.e.
6 years ago
www.abc.com
abc.com
external.www.abc.com.site
6 years ago
to
6 years ago
||abc.com*^
6 years ago
or similar.
6 years ago
Need to build the following algorithm:
1. grab original file;
2. mirror each string and sort ( like 'cat ./file1 | rev | sort > file2' );
3. moving down, remember each string and compare it with all the rest, deleting all longer ones ( "moc.cba||" -> delete all "moc.cba\.*" );
4. revert strings back and sort;
5. done.
Better to be written in bash/sed/awk or python or Go.