dma_k 2 Posted January 5 Posted January 5 I am using Android app v3.5.16. When I select the server, long press and select "Forget This Server", then nothing happens. I tried a few times... Expected that server is removed and I can add it again.
Luke 42077 Posted January 5 Posted January 5 Hi, if the server is on the same local network as the device, then after you click forget, it is probably just rediscovering it.
dma_k 2 Posted January 6 Author Posted January 6 (edited) 20 hours ago, Luke said: Hi, if the server is on the same local network as the device, then after you click forget, it is probably just rediscovering it. Thanks, that explains the behavior. Shouldn't the app show the message "The server xxx has been autodiscovered, would you like to add it [yes|no]?" That is probably the topic for another thread, but I decided to remove the server and re-add it, as connect to it does not work smoothly when I am on local network. Emby works just perfect under Apache proxy when I access it from Internet (using URL https://emby.myserver.com), for example, when I switch off WiFi on my mobile and use 4G. Emby seems to fail to connect to Emby server when Emby app accesses it from local network (WiFi is enabled)? Because then it shows above screen to select server. However when I click on "Downloads" icon on the bottom and then back to "Home", then correct Home screen is displayed (I can play videos / media). Also I tested the connection (telnet 192.168.21.1 8096) and it works just fine. Something to do with autodiscovery? Update: I got more details about the issue. Clients in local network are only allowed to access internet via proxy. Have you thought about such scenario? What happens is that Emby app asks proxy server to CONNECT 192.168.21.1:8096, but this is not allowed. Then on some reason Emby app sends GET http://192.168.21.1:8096/emby/system/info/public to proxy (that is allowed) and from them point it works fine. So I think that: If Emby app wants to connect to server using discovered IP address, it should ignore proxy settings for WiFi. Otherwise Emby app should use configured URL (CONNECT emby.myserver.com 443) at all times. Any better ideas? Edited January 6 by dma_k
Luke 42077 Posted January 19 Posted January 19 Quote Thanks, that explains the behavior. Shouldn't the app show the message "The server xxx has been autodiscovered, would you like to add it [yes|no]?" Hi, yes I think there are improvements that can be made to make it more obvious what has happened.
Luke 42077 Posted January 19 Posted January 19 Quote If Emby app wants to connect to server using discovered IP address, it should ignore proxy settings for WiFi. Hi, where are the proxy settings? Emby apps don't have any visibility into this. They use the device's network stack to test for connectivity to http://192.168.21.1:8096/emby/system/info/public
dma_k 2 Posted January 19 Author Posted January 19 (edited) > Hi, where are the proxy settings? Typically proxy does not allow to CONNECT to 8096 port, since it is not a standard HTTPs port. The workaround could be to add 192.168.21.1 as exception for proxy settings on each Android device, but that does not scale well. First of all I wonder why Emby app needs to initiate HTTPs connection in internal network? It can consider that internal network is trusted / secured, so use GET all the time (GET http://192.168.21.1:8096/emby/system/info/public). Also Emby server could be located in DMZ zone, which means that it is still on 192.168.21.1, but that IP address is not directly reachable – only via Apache/Nginx/... reverse proxy. In that respect I wonder how is it possible to "disable" local IP discovery and force Emby app to use configured URL (CONNECT emby.myserver.com 443) at all times. Edited January 19 by dma_k
Lessaj 467 Posted January 19 Posted January 19 9 hours ago, dma_k said: Also Emby server could be located in DMZ zone, which means that it is still on 192.168.21.1, but that IP address is not directly reachable – only via Apache/Nginx/... reverse proxy. In that respect I wonder how is it possible to "disable" local IP discovery and force Emby app to use configured URL (CONNECT emby.myserver.com 443) at all times. In order to force it to use the "remote address" you have to make the local address on 8096 inaccessible, either by a ACL/firewall rule on your network equipment, or on the server device firewall. That's how I force all clients even in my internal network go through the reverse proxy, they cannot access the local address on 8096 via an ACL so they fall back to the "remote address" - which in my internal network resolves to the reverse proxy IP, and outside my network resolves to the external reverse proxy IP. Preventing the local discovery is a bit harder since I believe it's a multicast, but may only work for the same subnet, so if the server device is on a different subnet and you don't have any multicast repeaters it may not be discovered. To my knowledge since my server is on a different subnet than my devices they don't auto discover the server, but I can see in the app logs that it does try to connect to the local address (and fails, so it falls back to the remote address).
dma_k 2 Posted January 20 Author Posted January 20 Quote In order to force it to use the "remote address" you have to make the local address on 8096 inaccessible Then the solution could be to implement the option "bind to localhost" in Settings, which means that Emby server opens the port 0.0.0.0:8096. What do you think?
Lessaj 467 Posted January 20 Posted January 20 5 hours ago, dma_k said: Then the solution could be to implement the option "bind to localhost" in Settings, which means that Emby server opens the port 0.0.0.0:8096. What do you think? Not sure what you mean, it already listens on all addresses (0.0.0.0). I just meant if you have, for example, a server at 192.168.0.10 that you should not be able to reach 192.168.0.10:8096 from other devices, even on your local network. If you block it, it will fall back to using the remote address, which could be for example my.domain.com.
dma_k 2 Posted January 20 Author Posted January 20 Ah, sorry, I meant 127.0.0.1:8096 (so, listen only on localhost). I think having the settings option "Bind to localhost" or similar will do the job. Or maybe play a trick with "Local IP address"? E.g. if that is set to "127.0.0.1" then it changes the binding and disables the announcement.
Lessaj 467 Posted January 20 Posted January 20 I don't think that binding to localhost would solve the problem, and I don't think setting the local IP address to 127.0.0.1 would stop the multicast, it's just the IP that is advertised to the clients. It may force them to use the remote address if you set it to that, but I think it would be better to block access to the port. In my setup I block access to 8096 and the reverse proxy uses the HTTPS port so it's secured at all times.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now