JGeek00 / droid-hole

Pi-holeยฎ client made with Flutter
Apache License 2.0
135 stars 11 forks source link

Failed. Unknown error #1

Closed lexcyn closed 2 years ago

lexcyn commented 2 years ago

Can't connect to any pihole on my network, always get "failed. Unknown error".

There is no documentation on what syntax you need to add a pihole instance so I'm not sure if what I'm doing is wrong, but I've tried just the IP, the IP with admin page, hostname, etc and nothing works.

JGeek00 commented 2 years ago

Hi. Thanks for reporting the issue. I have to do a lot of improvements in connection error handling. For now, I have divided address field into IP address field and port field. Now it should be easier. I will upload an update later. For me it's working as expected. Tell me if it works for you as well.

lexcyn commented 2 years ago

Thanks, the latest update resolved the connection issues for me.

ronny332 commented 2 years ago

The current release works very good for me, congratulations for this nice application. One question to avoid a new open issue: do you have any plans to implement ssl handling? Normally I have port 80 closed and only port 443 open. Just to avoid unencrypted traffic. Keep going! ๐Ÿ˜Š

JGeek00 commented 2 years ago

Thanks! I take note about that. I didn't think about it. For now, I can't give an expected time about when it will be available, but I will consider it and I will do some testing to implement it on the application. If you have any other feature requests, feel free to open new issues and mark it as feature request.

ronny332 commented 2 years ago

What should I say ๐Ÿ™‚ ... 2 days later and you implemented SSL and it works. One addition: as long as you want an ip to connect to, you can make SSL validation checking default to ignore. Certificates are checking against domains, not ips ๐Ÿ™ƒ

JGeek00 commented 2 years ago

Well... That's true, but if you want to make a request using HTTPS, it doesn't matter if you use the IP or the domain, it will throw an error if the certificate is invalid. That's why I implemented the option to override the certificate validation. If you want to connect using HTTPS, but you don't have a valid certificate, you can enable that option and it will work (if you want to use HTTPS you should have a valid certificate, but there's a posibility that some users could not have it). I'm saying this because this it's my situation. On my primary Pi-hole server I connect using HTTP (I only connect to the admin panel from my local network), so I don't have this problems with the certificates. For this development, I had to install another Pi-hole server on an old Raspberry Pi (it's the B+ model and it's VERY slow ๐Ÿคฆ๐Ÿปโ€โ™‚๏ธ) just to develop and test this functionality, and I only did the necessary steps to allow HTTPS connections to the server. I didn't generate a valid certificate neither I assigned a domain to it.

Anyway. I will allow to introduce domains on the IP field, so you can choose if you want to connect using the server's IP or the domain. As I said, I can't test the connection using a domain. It should work just like with the IP address, but I will appreciate it if when I upload this update, you tell me if it's working fine or not.