mirror of
https://github.com/pi-hole/pi-hole
synced 2024-12-22 14:58:08 +00:00
Allow TLD blocking using ABP style
This validates patterns without dots (only for abp style), allowing TLDs to be blocked Signed-off-by: RD WebDesign <github@rdwebdesign.com.br>
This commit is contained in:
parent
9d4a69c1d0
commit
c71460e4b6
@ -549,10 +549,12 @@ parseList() {
|
|||||||
# define valid domain patterns
|
# define valid domain patterns
|
||||||
# no need to include uppercase letters, as we convert to lowercase in gravity_ParseFileIntoDomains() already
|
# no need to include uppercase letters, as we convert to lowercase in gravity_ParseFileIntoDomains() already
|
||||||
# adapted from https://stackoverflow.com/a/30007882
|
# adapted from https://stackoverflow.com/a/30007882
|
||||||
# supported ABP style: ||subdomain.domain.tlp^
|
|
||||||
|
|
||||||
valid_domain_pattern="([a-z0-9]([a-z0-9_-]{0,61}[a-z0-9]){0,1}\.)+[a-z0-9][a-z0-9-]{0,61}[a-z0-9]"
|
valid_domain_pattern="([a-z0-9]([a-z0-9_-]{0,61}[a-z0-9]){0,1}\.)+[a-z0-9][a-z0-9-]{0,61}[a-z0-9]"
|
||||||
abp_domain_pattern="\|\|${valid_domain_pattern}\^"
|
|
||||||
|
# supported ABP style: ||subdomain.domain.tld^
|
||||||
|
# allow TLD blocking using ABP style: ||tld^
|
||||||
|
abp_domain_pattern="\|\|([a-z0-9]([a-z0-9_-]{0,61}[a-z0-9]){0,1}\.)*[a-z0-9][a-z0-9-]{0,61}[a-z0-9]\^"
|
||||||
|
|
||||||
# A list of items of common local hostnames not to report as unusable
|
# A list of items of common local hostnames not to report as unusable
|
||||||
# Some lists (i.e StevenBlack's) contain these as they are supposed to be used as HOST files
|
# Some lists (i.e StevenBlack's) contain these as they are supposed to be used as HOST files
|
||||||
|
Loading…
Reference in New Issue
Block a user