Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Blendi opened this issue Feb 15, 2025 · 3 comments

Comments

@Blendi
Copy link

Blendi commented Feb 15, 2025

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.

@marinofaggiana
Copy link
Member

Hi @Blendi why not add 2 users, one for the external use and one for internal use ?

marino @ https://mysmarthomen.fritz.box:8099
marino @ https://nextcloud.mysmarthome.uk

@Blendi
Copy link
Author

Blendi commented Feb 16, 2025

Hi @marinofaggiana.

Thanks for the suggestion. That is actually my workaround. I have created 2 logins with my account, one with internal url, the other with external. With nextcloud app itself is not a big deal. The main issue I have is with nextcloud talk app which I use for sharing quickly messages and pictures with a group. When at home I don’t receive any messages unless I remember to switch it from account with external url to internal. From my understanding and experience only one account is active at one time. When account with internal url is selected, I dont show online anymore if connected from outside my home network.

Anyway this is a feature request I would like nextcloud to take into consideration. I don’t know if it is easy or hard to implement. Looks and sound simple :).

Just let the app chose which url to use based on the wifi or mobile network status.

Now that I am thinking probably the app itself would need a trigger to make the check. Not sure if IOS offer integration that would trigger nextcloud app to determine proper url link when Iphone IOS wifi connects or drops from network

@marinofaggiana
Copy link
Member

I can understand @Blendi but your request has never been requested, but you never know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants