Seperate lists into categories

Disclaimer: This may be a mild "repeat" of a FR (or two or three)

What would have to change

  • Filestructure Changes
    ** create two subdirectories under /etc/pihole/
    *** gravitywell
    **** move gravity.list to this folder
    *** lists
    **** move adlist.list to this folder

  • Webui Changes
    ** Seperate Blocklists into it's own page
    ** add a "+" button to add categories. (default install will only have one) and a typing field.
    *** when you click this, have it (for this example we'll say user typed malicious):

touch gravitywell/malicious.list
touch lists/malicious.list
echo "addn-hosts=/etc/pihole/gravitywell/malicious.list" | tee --append $DNSMASQCONF &>/dev/null

** also would need a "-" button to do the exact opposite

  • gravity.sh changes:

for f in /etc/pihole/lists/*.list do BASEFILENAME=$(echo basename $f | cut -f 1 -d '.'`)
adList=${piholeDir}/gravitywell/"$BASEFILENAME".list

(do all the normal gravity.sh stuff)

grep dnsmasq conf for the necessary line

done

Added Benefits

  • dnsmasq "might" recover faster from a restart.

Other Random Thoughts

  • Have suggested category names

  • Give the lists a syntax that you can name lists, so that lists don't all say "raw.github...."

  • create a parseme.list for lists that are not compatible with Pi-hole.
    ** have a separate version of gravity that can parse the list down to make it compatible.
    ** process this .list separately from gravity, and separately, as it will take longer

Implemented with pihole v5.0 via Group management.