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

Announce/publish AdGuardHome service via mDNS #1118

Open
3 tasks done
frenck opened this issue Oct 24, 2019 · 4 comments
Open
3 tasks done

Announce/publish AdGuardHome service via mDNS #1118

frenck opened this issue Oct 24, 2019 · 4 comments

Comments

@frenck
Copy link
Contributor

frenck commented Oct 24, 2019

Prerequisites

Please answer the following questions for yourself before submitting an issue. YOU MAY DELETE THE PREREQUISITES SECTION.

  • I am running the latest version
  • I checked the documentation and found no answer
  • I checked to make sure that this issue has not already been filed

Problem Description

The AdGuardHome API is pretty awesome, however, a service consuming that API has to ask the user for information. As it cannot find AdGuardHome on the network by itself (unless doing enumerating scan's and other guesses, which well... let's just not 😉)

Proposed Solution

It would be great if AdGuardHome published a zeroconf/mdns/dns-sd record, so an application that can consume the AdGuardHome API can auto-detect it on the network

Alternatives Considered

None. Well, except maybe the AdGuard Home Hass.io add-on, it publishes this information inside it's Docker container startup towards Home Assistant (which consumes the API).

Additional Information

  • The impact and implementation time for this feature should be low.

  • This would add the capability for every user of Home Assistant (including people not running the Hass.io system) to get a single click experience on integrating the two.

  • It would be preferred to have a startup CLI argument to disable this feature.

  • Example lib by Hasicorp: https://github.com/hashicorp/mdns

    // Setup our service export
    host, _ := os.Hostname()
    info := []string{"AdGuard Home"},
    service, _ := NewMDNSService(host, "_adguardhome._tcp", "", "", 3000, nil, info)
    
    // Create the mDNS server, defer shutdown
    server, _ := mdns.NewServer(&mdns.Config{Zone: service})
    defer server.Shutdown()
@ameshkov
Copy link
Member

Good idea, thank you!

@ameshkov
Copy link
Member

@szolin please note that if we implement this, AGH will occupy port 5353 so here's what we'll need to change:

  1. Configuration: it should be possible to enable or disable mDNS in the config file
  2. Initial setup wizard (port 53 is no more possible to enter there)
  3. Wiki: add information about configuring mDNS there
  4. Docker configuration: expose port 5353

@frenck

It would be preferred to have a startup CLI argument to disable this feature.

We could do it, but tbh I think configuration file would be enough.

@ameshkov ameshkov added this to the v1.0 milestone Oct 31, 2019
@ameshkov
Copy link
Member

Assigned to v1.0, we should stabilize the API first.

@ammnt
Copy link

ammnt commented Dec 25, 2020

That would be very nice! 🤗 Most recently, I tried to solve this problem using port forwarding 5353 - > 53, but to no avail!😫Can there be a temporary solution to this problem?

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

3 participants