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

Offen
#18,104 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Anfängerfreundlichkeit
25/100
Issue-Typ
Feature
Klarheit
Größtenteils klar
Aktivitätsstatus
Aktiv
Tech-Stack
android, kotlin

Rechercherichtung

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.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

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
Vorherrschende Sprache
Kotlin
Sterne
5.7k
Forks
2.1k
Ø Merge
2 T. 7 Std.
Gemergte PRs (30 T.)
149

Entwicklungsumgebung

In Codespaces öffnen

Startet den Dev-Container des Projekts im Browser, mit Ihrem eigenen GitHub-Konto.

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus nextcloud/android

Alle Issues in nextcloud/android

Ähnliche Issues

Weitere Issues zu Kotlin

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.