Skip to content

Feature Request: Automatic URL switching inside the IOS or Android app depending on network connectivity. #3312

Open
@Blendi

Description

@Blendi

Feature request

Is your feature request related to a problem? Please describe.

I have installed locally Nextcloud in my home network. (I have homeassistant installed on a N100 and nextcloud is installed as a addon. This does not change anything. It behaves as other normal installations.) To reach the instance from inside, I have issues a local certificate, and I use HTTPS. When I connect from the outside of my home network, I use the cloudflare addon, docker. Everything works fine from all devices. example: internal network address --> https://mysmarthomen.fritz.box:8099 and for external network I use --> https://nextcloud.mysmarthome.uk.
Important info: The Cloudflare docker with tunnels only start when I am not at home, thus when I am not connected to my home network. So when I am at home, cloudflare docker is stopped and external URL is unavailable. (This is an added measure to minimize possible external attacks)
Using local DNS to rederect me in my home network to my server when I use external URL will not HELP!!! Both URL have different SSL certificates. If I do that, I will then have SSL certificate error.

Describe the solution you'd like

I really like the solution homeassistant or Immich IOS app have implemented and would really appreciate if that could be added to nextcloud and nextcloud Talk apps. I don't know the details behind the solution but as per my understanding the app check if you are connected to your home network or other wifi networks or your mobile data. You define in the app your home network name.

  1. If you connect from your home WIFI network, use internal url, could be a IP address or a local DNS record example --> https://mysmarthomen.fritz.box:8099
  2. if app cheks and realizes you are connected with other WIFI network or mobile network then uses automatically external URL, in our case https://nextcloud.mysmarthome.uk.

Image

Describe alternatives you've considered
Currently I have created 2 login accounts in my IOS app with different URL, so when I am at home I switch to my account with internal URL. (External URL is down as Cloudflare is stopped.) When I am outside my home network I switch in my app to my account that uses external public network. The issue is I have always to remember to do it. My main issue is actually with Nextcloud TALK app as I don receive any message if I don't switch the account in the app.

Using always the external address or URL in theory and keeping cloudflare up and running should solve my issue, but it is counterproductive when coping large files to my phone or off my phone. Also I don't like the idea to have cloudflare always running and my apps always exposed to public when not necessary.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions