adguardhome-filters/README.md

31 lines
829 B
Markdown
Raw Normal View History

2019-03-04 20:47:16 +00:00
# adguardhome-filters
Hosts lists from Steven Black (https://github.com/StevenBlack/hosts)
2019-03-06 04:51:26 +00:00
Cleaned-up from "localhost" records.
127.0.0.1 replaced to 0.0.0.0
Extensions are left unmerged.
2019-03-04 20:47:16 +00:00
2019-03-04 20:47:34 +00:00
Files are used for AdGuard Home DNS filtering.
2019-03-06 04:35:55 +00:00
2019-03-06 04:46:30 +00:00
P.S. Looking for the way to translate easily multiple hostname records
2019-03-06 04:35:55 +00:00
to one line accordingly to general AdBlock rules set, i.e.
2019-03-06 04:47:55 +00:00
2019-03-06 04:35:55 +00:00
www.abc.com
abc.com
external.www.abc.com.site
2019-03-06 04:47:55 +00:00
2019-03-06 04:35:55 +00:00
to
2019-03-06 04:47:55 +00:00
2019-03-06 04:35:55 +00:00
||abc.com*^
2019-03-06 04:47:55 +00:00
2019-03-06 04:35:55 +00:00
or similar.
2019-04-15 16:02:05 +00:00
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.