Jump to content

Improve local app discoverability using DNS or mDNS


LordMike
Go to solution Solved by ebr,

Recommended Posts

LordMike

Hey,

In my network, I have my emby server running (as others do), but when I set up new apps I need to type in the server name, and port - always. This sucks. It would be awesome to have the apps autodiscover this information - and I have three ways of doing this:

Use an SRV record in the local DNS zone:
SRV records are well known and supported, to help clients discover resources on the network. It would be possible to have a well known name, like:

Quote
Format: _service._proto.name. ttl IN SRV priority weight port target.

_emby._tcp.example.com. 3600 IN SRV 10 10 80 emby.example.com.

Using this, the app would able to look for _emby._tcp at the local DNS zone (get this from the netcard). In return, the client will discover:

  • The servers name (emby.example.com)
  • The servers port (80)

.. thereby saving the user from typing this in.

Unlike mDNS, DNS can be configured by a network administrator to support "odd" scenarios, like if a I had a network where I wanted to use a specific Emby server (on the internet, or some other reachable network) - I could configure this in DNS and have the client apps in my network discover this server - even though it wasn't available locally.

Use an SRV record in mDNS:
mDNS is a DNS system where each participating computer announces itself. Emby Server would be able to join this multicast DNS network, and announce the SRV record from before. Client apps would do the same, and then perform the query in mDNS instead of DNS. The benefit here is that this is likely zero-configuration for an end user. The server will automatically announce itself, and clients can automatically find the server(s) in the network.

This and SRV in DNS is also sometimes called "DNS-SD" for "DNS Service Discovery".

Create a custom UDP broadcast request and response:
Much like multicast DNS, you could send out a custom UDP packet to 255.255.255.255, thereby broadcasting it to the network. The Emby Server could then respond to this, with the server name and port.

This will not work well in IPv6 though.

Mike.

  • Like 1
Link to comment
Share on other sites

  • Solution

Hi.  We already do this via UDP.  Check your firewall to be sure that protocol isn't being blocked.

Link to comment
Share on other sites

Quote

Create a custom UDP broadcast request and response:
Much like multicast DNS, you could send out a custom UDP packet to 255.255.255.255, thereby broadcasting it to the network. The Emby Server could then respond to this, with the server name and port.

Hi, yes this is exactly what we already do.

Link to comment
Share on other sites

LordMike

I really dislike the custom UDP protocol solution, as there already exist protocols to help with this.. 

It likely doesn't work for me, as I run my Emby server within a docker container 😕

 

Would you consider doing the DNS based version? :) 

Link to comment
Share on other sites

13 hours ago, LordMike said:

I really dislike the custom UDP protocol solution, as there already exist protocols to help with this.. 

It likely doesn't work for me, as I run my Emby server within a docker container 😕

 

Would you consider doing the DNS based version? :) 

Do you have the networking mode on the container set to host?

Link to comment
Share on other sites

  • 1 month later...
LordMike

I do not - which is why it won't work. I prefer all my containers to be self-contained and limited, which precludes anything like broadcast-based stuff.

mDNS, broadcasts and similar will also not work across layer 3 VPNs, such as when I connect to my at-home VPN with my iPhone. Here, the iPhone cannot do mDNS and likely not broadcasting stuff either, so here a DNS solution is the only one that will work for service discovery.. :)

  • Thanks 1
Link to comment
Share on other sites

  • 11 months later...
Oratorian

I am here to support LordMikes suggestion. I access emby via VPN and mDNS, DLNA und broadcasting does not work here either.

A solution for the clients to check for quote:

_emby._tcp.example.com. 3600 IN SRV 10 10 80 emby.example.com.

whould be awesome.

Link to comment
Share on other sites

  • 1 year later...
kakashi55
On 12/4/2021 at 7:02 AM, Luke said:

Hi, yes this is exactly what we already do

Does Android Server support auto discoverability on local network ? 

On my local network, all emby clients can auto discover emby windows server, but not emby Android server.

Thanks.

 

Edited by kakashi55
Link to comment
Share on other sites

On 2/22/2024 at 4:22 AM, kakashi55 said:

Does Android Server support auto discoverability on local network ? 

On my local network, all emby clients can auto discover emby windows server, but not emby Android server.

Thanks.

 

HI, it does, yes. We'll do some testing with the android server in case a regression might have occurred. Thanks.

  • Like 1
Link to comment
Share on other sites

kakashi55
9 hours ago, Luke said:

HI, it does, yes. We'll do some testing with the android server in case a regression might have occurred. Thanks.

fyi, I am running version 4.7.14.0, 4.8.0.64 and 4.9.0.4 on Android 8, Android 10 and Android 12 respectively. Thanks. All three devices are smartphones.

Edited by kakashi55
  • Thanks 1
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...