The pi-hole API key is really just the web password hashed twice with
SHA256, so instead of doing some complex stuff with logging in and
pulling the api key from the webpage with a regex, we can just do the
double hashing on device and save some time.
the scanning functionality in and of itself worked just fine, but upon
successful connection, it would return to the scan or direct connection
screen, then go to the authentication screen, and then return to the
previous screen. This little hack prevents that but it should really be
replaced with a better solution.
As soon as the user starts up the app, we'll first try to ping their DNS
server, as that should in theory be the Pi-Hole. If that doesn't work,
then we offer the user the chance to either scan their network or
manually enter in the IP address for their Pi.
I highly doubt most people will have their Pi-Hole set up with HTTPS (I
know I certainly don't), so plaintext traffic is a must. It shouldn't be
a problem witihin one's LAN.