audiobookshelf-app
audiobookshelf-app copied to clipboard
Server config allows both internal and external URL with automatic switching
Is your feature request related to a problem? Please describe.
It's technically not a problem and there are ways to remedy this - have two instances of the library configured in the app, but what I'm suggesting is a better way to configure and, when necessary, switch between internal and external connections.
Describe the solution you'd like
[Screenshot of Home Assistant app settings]
While setting up home assistant app, it asks for the internal url (192.168.x.x) and allows users to also add an external URL (x.domain.com) if the user has one. Then one enters/selects the local wifi SSID(s) and chooses which one (internal or external) to prioritise when on local wifi.
The app automatically switches to external if not connected to local wifi.
I think this is brilliant and as a user i don't have to worry about VPNs or other configurations when I'm not at home/connected to local wifi.
Perhaps, ABS could implement something similar.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.
You mention vpn, but I think the alternative to this feature request is configuring a router to handle hairpin NAT, or in other words configuring your router to say any requests from the local network that are directed to the router's public WAN address and/or domain, should be redirected to an address on the local network.
So let's say my local server is 192.168.0.5, my public WAN ip is 50.50.45.162, and my domain is mysite.com. With hairpin NAT configured, if my router gets a request from my device on my local network asking for 50.50.45.162, or for anything under "mysite.com", it should be handled on my local network instead of going out to the public Internet and back. It gets to the router and does a "hairpin" turn around back to the local network.
Similarly, one could do a DNS override. So that any device on the local network asking "how do I contact mysite.com" would be told by the router to "use 192.168.0.5". Then when the device is off the local network and asks the public DNS server "how do I contact mysite.com?" the public DNS responds "use 50.50.45.162" and it works.
But hairpin NAT and DNS overrides can be tricky to configure, and in some cases not possible depending on the hardware provided by your isp. So I agree this would be useful for people who aren't able to configure hairpin NAT for one reason or another.
I'm not a networking expert (or experienced person). I mentioned VPN because that's one of the things that came to my mind (because I have set up tailscale to connect to my apps/services if I am not on local network)... but the various ways to configure the router, server or the app wasn't the point.
The point was that if they did what HASS does, then the need to configure stuff (mostly) goes away and the app can switch automatically between two URLs based on whether local network is available or not... and for noobs or semi-noobs (like me) that would be very user-friendly.
Is this the same as #209
I think so. Because the image in #209 shows :8080 port, I am not exactly sure... but as long as it is the same as allowing configuring external and local addresses and switches seamlessly based on whether the device is connected to a local network SSID... you can merge the two if you want.
Duplicate of #209