seedvault-app / seedvault

A backup application for the Android Open Source Project.
1.25k stars 74 forks source link

Support WebDAV in LAN potentially with clear-text comms #714

Open eternal-sorrow opened 1 month ago

eternal-sorrow commented 1 month ago

I tried to work around #682 problem using WebDAV as a storage medium. I quickly setup a pluveto/flydav server on my PC, try to connect to it and get a UnknownServiceExcepton CLEARTEXT communication... I understand this as SeedVault is unable to connect to a server if it doesn't use SSL. But I don't need SSL in my local network. Could this be bypassed somehow?

eternal-sorrow commented 1 month ago

Also, judging by https://github.com/seedvault-app/seedvault/issues/85#issuecomment-2170765445, even if I somehow setup my local webdav server to use a self-singned certificate (using stunnel for example), then it still wouldn't work because my certificate is untrusted? Is there any way to use network for backup without setting up a real server in the internet and buying domain name for it?

grote commented 1 month ago

AFAIK, Android doesn't allow us to allow cleartext only for LAN. It is either per specific domain or for everything. We don't want everything and don't know your domain beforehand.

Also supporting LAN WebDAV would need to have other features like detecting the WiFi you are in, because otherwise it would produce lots of errors when it can't connect to your server. Then self-signed certificates and trusting user-supplied certificates may be the way to go. However, not sure if recent Android versions still allow you to add user CAs.

For local backups, we already support flash drives, so local LAN not a development priority at the moment.