[Feature] Network allowlist for sync intervals & reachability check on network change

Ouverte
#18,104 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Les mainteneurs répondent en général sous 1 jour

Personne n'a encore pris cette issue.

Évaluation

Difficulté
4/5
Temps estimé
3-5 jours
Accessibilité débutants
25/100
Type d'issue
Fonctionnalité
Clarté
Plutôt claire
Activité
Active
Stack technique
android, kotlin

Piste de recherche

Read the referenced discussion #16993 first for the prior reasoning, then locate the code that schedules periodic background sync and auto-upload, and the component that observes connectivity changes. Both proposed behaviours hang off those two places: an allowlist of Wi-Fi SSIDs, unmetered connections or VPN interfaces checked before a scheduled sync, and a reachability probe plus queued sync when the active network changes. Done means a sync is skipped on non-allowlisted networks and a reachability check runs on network switch, with tests covering both paths.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

0. Needs triage enhancement
Summary

For self-hosted Nextcloud instances that are not exposed publicly—or that switch between local/LAN, VPN (such as WireGuard), and cellular/external networks—periodic background syncs can run when the server is unreachable, while network transitions may not immediately trigger a reachability check or sync.

Proposed Behavior
  1. Whitelisted / allowed networks for scheduled syncs:
    • Allow users to restrict periodic sync / auto-upload workers to specific Wi-Fi SSIDs, unmetered connections, or active VPN interfaces.
    • Skip scheduled sync attempts when on non-whitelisted networks instead of attempting unreachable connections.
  2. Network-switch reachability & sync trigger:
    • When the active network changes (e.g., joining home Wi-Fi or connecting a VPN), refresh network/DNS state and run a lightweight reachability check against the configured server.
    • Trigger or queue sync when the server becomes reachable on the new network.
Use Case / Motivation

Self-hosters running private/LAN or VPN-only Nextcloud instances often experience wasted background retries when away from trusted networks, or delays waiting for the next interval after connecting to home Wi-Fi or a VPN. Related discussions have come up in threads such as #16993.

Additional Context
  • Android version: 16
  • Nextcloud Android app version: 35.1.0
  • Self-hosted setup (LAN / VPN / reverse proxy): self hosted and accessible on my LAN
Langage dominant
Kotlin
Étoiles
5.7k
Forks
2.1k
Merge moyen
2 j 7 h
PR mergées (30 j)
149

Préparer son environnement

Ouvrir dans Codespaces

Lance le conteneur de développement du projet dans votre navigateur, avec votre propre compte GitHub.

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de nextcloud/android

Toutes les issues de nextcloud/android

Issues similaires

Plus d'issues Kotlin

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.