bitfireAT / davx5-ose

DAVx⁵ is an open-source CalDAV/CardDAV suite and sync app for Android. You can also access your online files (WebDAV) with it.
https://www.davx5.com
GNU General Public License v3.0
1.59k stars 79 forks source link

Provide more fine-grained connection requirements #990

Open rfc2822 opened 3 months ago

rfc2822 commented 3 months ago

Further info:


Because this is starting to overwhelm me, I tried to create a table for the current state (v4.3.6.1):

SCENARIO WWW Server reachable Account Setting Checking sync starting
metered or wifi yes yes - NetworkType.CONNECTED + INTERNET VALIDATED yes
specific WiFi SSIDs only yes yes Added SSIDs INTERNET VALIDATED yes
public WiFi after login yes yes ? yes
public WiFi before login no no - ? no
WiFi only yes yes Enabled "Only sync over WiFi" NetworkType.UNMETERED yes
blocked validation yes yes Disabled validation requirement INTERNET yes
VPN yes yes Enabled "VPN Connectivity" (Ignore VPNs) INTERNET VALIDATED NOT_VPN yes
VPN yes yes Disabled "VPN Connectivity" (VPN counts) INTERNET VALIDATED yes
VPN no no Enabled "VPN Connectivity" (Ignore VPNs) INTERNET VALIDATED NOT_VPN no
VPN no no Disabled "VPN Connectivity" (VPN counts) INTERNET VALIDATED yes :( (needed for the below to work)
VPN + blocked validation yes yes Disabled "VPN Connectivity" (VPN counts) INTERNET VALIDATED yes (see https://github.com/bitfireAT/davx5/issues/345)
VPN without internet no yes N/A N/A N/A
LAN without internet no yes N/A N/A N/A

We should also consider whether potential settings should be account-specific or app-wide.

For VPN we may need to distinguish between "sync with and without VPN" and "sync only over VPN".

nutpantz commented 3 months ago

manual sync should be listed and the preferred action regardless of anything else is an attempted sync expected fail or not. manual sync should not be queued waiting for INTERNET VALIDATED

rfc2822 commented 1 month ago

Since WorkManager 2.10, we can now specify a NetworkRequest as a WorkManager constraint. This allows to request specific WiFi SSIDs or network types etc.