Update README.md

This commit is contained in:
alexsannikov 2019-04-16 21:25:44 -04:00 committed by GitHub
parent 5bc1eb595c
commit c716fff903
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 12 additions and 16 deletions

View File

@ -1,30 +1,26 @@
# adguardhome-filters
Hosts lists from Steven Black (https://github.com/StevenBlack/hosts)
Cleaned-up from "localhost" records.
127.0.0.1 replaced to 0.0.0.0
Extensions are left unmerged.
cleaned-up from "localhost" records;
127.0.0.1 and 0.0.0.0 replaced to ||;
extensions are left unmerged;
left most top-domain only;
Files are used for AdGuard Home DNS filtering.
P.S. Looking for the way to translate easily multiple hostname records
P.S. Looking for the intellectual algorithm to translate easily multiple hostname records
to one line accordingly to general AdBlock rules set, i.e.
www.abc.com
abc.com
external.www.abc.com.site
www1.abc.com
extra.abc.com
external.www.abc.com
pictures.domain.com
pictures1.domain.co.nz
pic-tures.domain.net.site
to
||abc.com*^
||domain.*^
or similar.
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.