Hi, I'm using Pi-Hole on K3S and I tried to insert an ABP Style allowlist (that I use also on AdBlockPlus) via the adlists.list file (mounted via configmap), but Pi-Hole inserts that list always as blacklist, and I don't find a method to set as an allow list. If I insert the list manually from the gui it works.
Am I doing anything wrong or actually at this time it's not possible?
Thanks
Have you tried Privoxy, this might work better for your needs?
Pi-hole only works on domains.
Privoxy is a free non-caching web proxy with filtering capabilities for enhancing privacy, manipulating cookies and modifying web page data and HTTP headers before the page is rendered by the browser. Privoxy is a "privacy enhancing proxy", filtering web pages and removing advertisements. Privoxy can be customised by users, for both stand-alone systems and multi-user networks.
adlists.list contains "ad lists", to block advertisements.
adlists.list file was introduced a long time before Pi-hole include allowlists. Currently there is no file to add allowlists. You will need to add them via web interface.
Hi, i don't think it's the best solution for me beacause I don't want to remove AdBlock on the browser, for me it's more 'wide', for example in my work laptop where I can't use PiHole
Ok thanks, as you know there's some idea or project to integrate this functionality in the near future?
You should be able to use my pihole-updatelists tool.
But if you don't want to install anything more then you could also use a bash script and SQL queries to insert directly into the database, untested code idea:
#!/bin/bash
while IFS= read -r line; do
[ -z "$line" ] && continue
sqlite3 /path/to/gravity.db "INSERT INTO adlist (address, enabled, type, comment) VALUES ('$line', 1, 1, 'Added through script');"
done < allowlists.txt
type=0 -> blocklist
type=1 -> allowlist
Note that this bash script does not handle duplicates in any way.
If your goal is just to insert those into fresh database then the bash script solution will be the best here.
Hi, I'm going to have a look at your project, I need to see the mods between the original and your image. Considering that my instance is on kubernetes I can use your image or use a Init container for the mods, but I need to manage the duplicates myself, thanks for now