Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide more fine-grained connection requirements #990

Open
5 of 11 tasks
rfc2822 opened this issue Aug 21, 2024 · 2 comments
Open
5 of 11 tasks

Provide more fine-grained connection requirements #990

rfc2822 opened this issue Aug 21, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@rfc2822
Copy link
Member

rfc2822 commented Aug 21, 2024

  • Normal sync over mobile Internet → covered by NetworkType.CONNECTED
  • Normal sync over WiFi only → covered by NetWorkType.UNMETERED if "Only sync over WiFi" is set
  • Normal sync over private WiFi
  • Normal sync over public WiFi with login (don't sync until user has logged in)
  • Sync with connection in private LAN without validated Internet
  • Sync with Internet connection where Android processes are blocked by firewall so they can't validate the connection
  • Sync with "always-on" VPN (like Blokada) → currently filtering VPNs, but seems that this isn't a good solution because there are real VPNs without validated Internet
  • Sync with real VPN on top of validated Internet
  • Shorten version hash of vcard4android library #345
  • If WiFi is used: limit WiFi to specific SSIDs (the SSID filter could also be used even if all connection types are allowed)

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
Copy link

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
Copy link
Member Author

rfc2822 commented Oct 31, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants