-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ABP style adlists #77
Comments
You discovered one issue (total_domains being empty): pi-hole/FTL#1573 The rest is a feature request and I'm not sure if there is a feasible way to solve it: ABP style domains are handled as a special kind of "RegEX" within FTL and I'm not sure if there is good way to handle them within |
Hi! I would also find it very helpful to use ABP-style lists with Pi-hole. The list I'm looking at is effectively just a list of domains, but in ABP format: https://v.firebog.net/hosts/Admiral.txt Examples:
I was able to get the domains recognized by adding: -e 's/^\|\|(.*)\^$/\1/' \ To this # 2) Remove carriage returns
# 3) Remove lines starting with ! (ABP Comments)
# 4) Remove lines starting with [ (ABP Header)
# 5) Remove lines containing ABP extended CSS selectors ("##", "#!#", "#@#", "#?#") preceded by a letter
# 6) Remove comments (text starting with "#", include possible spaces before the hash sign)
# 7) Remove leading tabs, spaces, etc. (Also removes leading IP addresses)
# 8) Convert from ABP format: ||some.domain.here^ --> some.domain.here
# 9) Remove empty lines
sed -i -r \
-e 's/\r$//' \
-e 's/\s*!.*//g' \
-e 's/\s*\[.*//g' \
-e '/[a-z]\#[$?@]{0,1}\#/d' \
-e 's/\s*#.*//g' \
-e 's/^.*\s+//g' \
-e 's/^\|\|(.*)\^$/\1/' \
-e '/^$/d' "${destination}" (Note the above snippet has the new expression and a matching comment.) This doesn't solve the full problem of handling fancy ABP patterns, but it might be worth adding to take advantage of the many hosts- / domains-only lists out there. Happy to open a PR for this, but honestly, it took me long enough to even find your Github org, and I still haven't figured out exactly where Current versions:
Thanks again! |
I'm not sure what you try to archieve with this RegEx and if this should improve |
@yubiuser Ah, I might have misfired -- Sorry for the noise. I'll make this suggestion over in the pi-hole repo. Thanks for the redirect! |
Report currently does not show the number for ABP style adlists.
Please consider include calculation for ABP style adlists.
Thank you
The text was updated successfully, but these errors were encountered: