sterrenb / flutterhole

A third party Android application for the Pi-Hole® dashboard.
https://play.google.com/store/apps/details?id=sterrenburg.github.flutterhole
MIT License
400 stars 27 forks source link

V5 whitelist/blacklist #76

Closed sterrenb closed 4 years ago

sterrenb commented 4 years ago

Since V5 fetching the whitelist with the old format throws a server error:

These return a 500 status on my local Pi. Not sure if the API changed or my Pihole installation is funky.

The V5 dashboard seems to get its data http://pi.hole/admin/scripts/pi-hole/php/groups.php with some url encoded form data.

If anyone manages to query their Pi properly, please let me know!

p1r473 commented 4 years ago

Is this why the option to whitelist/blacklist seems to be gone in latest Flutterboard? How can I test this for you?

sterrenb commented 4 years ago

@p1r473 that is correct! Perhaps you can report the server response from your own Pi-hole.

Try running the following in your browser:

{{ base_url }}?list=white&auth={{ auth }}

This would look something like the following:

http://pi.hole/admin/api.php?list=white&auth=my_token

This used to return a JSON object of the whitelists. On my V5 Pi-hole, the server crashes with a HTTP status code 500.

As a sidenote, the official documentation seems to indicate that the black/whitelisting commands are now only accessible via direct SQL. Not sure how this could be integrated into the app, but I hope there still is an API endpoint somewhere...

p1r473 commented 4 years ago

Same here. Have you opened a bug at the PiHole github? https://192.168.1.186:445/admin/api.php?list=white&auth= APIKEY image

p1r473 commented 4 years ago

Looks like pihole -w and pihole -b still work, The whitelist and blacklist commands.

sterrenb commented 4 years ago

Same here. Have you opened a bug at the PiHole github?

Thank you for trying it out 👍. I will try and create an issue over at the Pi-hole team.

Looks like pihole -w and pihole -b still work, The whitelist and blacklist commands.

These are CLI commands right? I've thought about using SSH in the app, but it sounds like a security nightmare.

p1r473 commented 4 years ago

Yup those are CLI commands. If you make a PiHole ticket I will back it up with my evidence.

p1r473 commented 4 years ago

@sterrenburg can you link your PiHole GitHub issue so I can post my evidence there?

sterrenb commented 4 years ago

@sterrenburg can you link your PiHole GitHub issue so I can post my evidence there?

Just now I posted on the Pi-hole discourse, thank you for taking a look:

https://discourse.pi-hole.net/t/black-whitelisting-does-not-work-on-v5-api/33119

The new API is being worked on in a Pi-hole pull, I imagine that the current API interface will need to change on my end once it is released.

elmicha commented 4 years ago

Here a Pi-hole developer wrote that it is resolved in Pi-hole v5.1 and the current version seems to be 5.1.2, so I guess it's fixed now on the Pi-hole side.

sterrenb commented 4 years ago

@elmicha thank you for bringing this to my attention! Assuming all goes well, I expect to add white-/blacklist support back in the upcoming release.