Skip to content

Provide more fine-grained connection requirements #990

@rfc2822

Description

@rfc2822
  • 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 :( ❗ It's 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".


Android 16 introduced local-network-permission:
https://developer.android.com/about/versions/16/behavior-changes-16#local-network-permission

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions