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

Đang mở
#18,104 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
25/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
android, kotlin
Lĩnh vực
mobile-dev, networking

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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
Ngôn ngữ chính
Kotlin
Star
5.7k
Fork
2.1k
Merge trung bình
2 ngày 7 giờ
Pull request đã merge (30 ngày)
149

Chuẩn bị môi trường

Mở trong Codespaces

Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của nextcloud/android

Tất cả issue của nextcloud/android

Issue tương tự

Thêm issue về Kotlin

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.